
About Tutor_11
This tutor introduces the use of a TOAST window to notify the user about a specific event.
It pops up from the bottom right edge of a parent window, and auto-hides itself after 15 secondes.
This project uses 2 GDImage controls:
The first, is a child window working in DWM transparent mode, using the whole client area to display a helper message.
The second, is a popup child window (the Toast window).
ZI_DwmEnable
This API enable the DWM transparent mode for a specific window (Main and Toast).
ZI_CreateImageComposited
This API is used to create on the fly a composited image from multiple object layers,
they are defined first in a ZOBJECT array using any GDImage object type.
The z-order composition will match the array order, the lower indice at the bottom, the higher on top.
All layers are composited in memory, then saved to file into the temporary folder.
ZI_CreateWindowFromImage
This API creates the Toast window. It uses the magenta color, or the alpha channel to build a region on the fly.
In the example we use the previously saved composited image from the temporary folder.
The width/height of a Toast window is computed to fit the size of the text message.
Link to download the project