Author Topic: Tutor_18 (C++ VS2022 GDImage64 tutorial)  (Read 6706 times)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1992
    • zapsolution
Tutor_18 (C++ VS2022 GDImage64 tutorial)
« on: September 05, 2023, 09:26:17 am »
Eighteenth post of a series, translated from the "WinDev and PowerBASIC",
to explain the use of GDImage64 in procedural* programming mode with Visual Studio 2022.

About Tutor_18
This is a C++ transcription of a PowerBASIC demo written in 2009 with the official release of GDImage 5.00.
It was the first version able to mix 2D and 3D OpenGL into the same graphic control.
The application itself is skinned with WinLIFT, and share the same background wallpaper with all child controls.

The animation
Is using 1 OpenGL sphere (to display the moon, jupiter, mars, and pluto).
A multiframe bitmap to render the Jumper.
A text label bitmap.
And a mute button.

WinLIFT 6.00
Is an experimental version converted to VS2022, the whole code has been revisited for further code size reduction.
New API skMinTrackSizeX ();
return the minimum width size of main window once skinned.
New API skMinTrackSizeY ();
return the minimum height size of main window once skinned.
New API skUseThisBackground(IN HWND hWnd, IN WCHAR* zItem);
To change on the fly the wallpaper background without using the top left icon,
even when the .sks parameter is disabled "BACKGROUNDPATH,      resource\Background"
The skInitEngine API has an extra optional parameter:
skInitEngine (IN WCHAR* zSkinFile, IN WCHAR* zUserKey, IN HWND hParent);

GDImage 7.16
Is an experimental version converted to VS2022, with a new API named "ZD_GLtoBitmap" to dynamically turn the OpenGL context into a ZOBJECT sprite bitmap (see the RenderAnimation() procedure).


Last but not least,
the size of the standalone binary EXE is only 17 Kb.


   
* procedural programming mode, is based on direct use of the FLAT API (Windows SDK) that is the core meat of the OS.
Patrice
(Always working with the latest Windows version available...)