Fifth 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_05This tutor introduces the use of
sprite graphic controls to mimic the behavior of the standard Windows controls.
The Play/Pause buttons, and the audio track slider, send events to the
ProcessMessage() procedure, to process the command flow.
REAL TIME PROCESSING:
The
Oscillo() procedure is used by the timer to process the audio signal in real time.
The
Bass.dll from Ian Luck is used for playing/decoding the audio channel.
Use Drag & Drop from the explorer to play a new audio file, stream and music tracker extensions are supported:
.mp3, .wav, .ogg, .aif, .mo3, .it, .xm, .s3m, .mtm, .mod, .umx.Several effects are synchronized on the audio pulse to perform rotation, scalling, and color change.
PROGRESS GAUGE:
Display the percentage progression.
SEEK TRACKER:
Sets playback position of the audio file.
PRIVATE FONT:
The text name of the playing audio file is using a private font.
A private font do not need to be installed first, and the text always look the same whatever the computer used.
GDImage does all the hard work for you, the only thing you have to do, is to specify a .ttf extension when using the font name.
TOOLTIP:
Each sprite object is able to display a tooltip, using the friendly name label property.
WINDOW STYLE
The GDImage control is using the WS_BORDER style to let you see its client size inside of the main window.
BACKGROUND:
The GDImage graphic control, and the main window share 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.
Last but not least,
the size of the standalone binary EXE is only
29 Kb.
*
procedural programming mode, is based on direct use of the FLAT API (Windows SDK) that is the core meat of the OS.