Fortran QuickWin
With the help of https://www.intel.com/content/www/us/en/docs/fortran-compiler/developer-reference-build-windows-applications/15-0/using-quickwin.html
The include directory is useful as well, on my system it's located at : C:\Program Files (x86)\Intel\oneAPI\compiler\2024.0\opt\compiler\include
and ifqwin.f90 in particular. (same directory)
Install Intel OneAPI Toolkit, then install Intel HTC Tooolkit for the fortran compiler.
Run VS2022
Create a new project and select Fortran QuickWin Application
In source file, add a new element : Fortran Free-form File
The very minimalist code is :
It displays a minimal default window, with a message box to confirm exit.
Something slightly more interesting :
Running it as-is should display a window followed by a message box to confirm exit.
Most of it should be self-explanatory except the fontsize :
The variable wc%fontsize is given as hexadecimal constant of #0008000C, which is interpreted in two parts:
The left side of 0008 (8) specifies the width of the font, in pixels.
The right side of 000C (12 in decimal) specifies the height of the font, in pixels.
The requested font size is matched to the nearest available font size. If the matched size differs from the requested size, the matched size is used to determine the number of columns and rows.
If the requested configuration cannot be set, SETWINDOWCONFIG returns .FALSE. and calculates parameter values that will work and best fit the requested configuration. Another call to SETWINDOWCONFIG establishes default working values for the window.