Author Topic: Tutor_03 (C++ VS2022 GDImage64 tutorial)  (Read 1940 times)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1982
    • zapsolution
Tutor_03 (C++ VS2022 GDImage64 tutorial)
« on: June 06, 2023, 03:18:01 pm »
Third post of a series, translated from the "WinDev tutorial",
to explain the use of GDImage64 in procedural* programming mode with Visual Studio 2022.

About Tutor_03
This tutor introduces the use of clone sprites within a GDImage control.
The same bitmap is used by the {reference} sprite, and its clone(s) without wasting the memory.

Each clone has its own set of properties inherited from the {reference} sprite, and they can also be customized.
They are created in the GDImageCreateSprite() procedure.
All sprites/clones are stored along the z-order, from bottom to top, in their order of appearance.
In the CHM help file, search for: ZD_SetObjectZorder and ZD_GetObjectZorder.
Each sprite/clone can have a different label (friendly name), and specific anchor property .

BACKGROUND:
The GDImage graphic control, and the main window are using the same bitmap wallpaper,
see the GDImageUpdateBackround() procedure and the ZI_CreateSkinBackground(...) API.
The bitmap is also updated while processing the WM_SIZE message, with the ResizeGDImageCtrl() procedure.

ANIMATION:
They are handled from the WM_TIMER message and the Animate() procedure.

TEXT ROTATION:
This sprite is using a private font stored in the \Resource folder.
A private font can only be used by the application, without installing it first in Windows.

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


   
* procedural programming mode, is based on direct use of the FLAT API (Windows SDK) that is the core meat of the OS.
« Last Edit: August 18, 2023, 10:31:13 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)