First 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_01This is a GDImage "Hello World" project, based on "
Programming Windows" by Charles Petzold.
All the child controls are created in the
CreateControls() procedure.
Among them,
CreateWindowExW(0, GDImageClassName, Resource((WCHAR*) L"paintbrush.png"), ...), is the one used by every GDImage container.
Resource((WCHAR*) L"paintbrush.png"), means use this image to paint the background of the control, it works like the desktop wallpaper background in Windows.
If the size of the image is larger that the window, then scrollbars are used to move the content.
This is shown in context when you press the "
Capture screen" button,
and
GDImageCaptureScreen() is the code that performs the capture.
You can also use a gradient to paint the background with
// Use a GDImage gradient color to paint the background
ZI_SetProperty(hCtrl, ZI_GradientTop, ZD_ARGB(255, 0,0,64));
ZI_SetProperty(hCtrl, ZI_GradientBottom, ZD_ARGB(255, 0,240,255));So far the
Status Bar is not used.
All child controls are anchored within the main window using the
ZI_SetAnchorMode API, and the appropriate ANCHOR_PROPERTY.
Last but not least,
the size of the standalone binary EXE is only
15 Kb.
*
procedural programming mode, is based on direct use of the FLAT API (Windows SDK) that is the core meat of the OS.