Embed assigns a window to every block. Normally, Embed manages the painting of the block window with text. The Window function gives you the opportunity to put your own or third-party window as a child window of a block, or paint whatever you like in a block window, including:
• Bitmaps
• Videos
• Geometric shapes and lines
• Plots and gauges
The Window function can only be used with user-created blocks for add-on modules.
The Window function follows the naming convention for add-on block functions: Its name has the WF suffix and its data type is USER_EVENT_FUNC. For example, if the base name for block functions is Display, the following code implements block window support:
EXPORT32 LPSTR EXPORT PASCAL DisplayWF(HWND h, int msg, WPARAM arg1, LPARAM arg2)
Embed communicates with the Window function using the following messages as the second function parameter:
VSM_WF_CREATE_WINDOW
VSM_WF_DESTROY_WINDOW
VSM_WF_GET_WIDTH
VSM_WF_GET_HEIGHT
VSM_WF_PLOT_WINDOW
VSM_WF_PRINT_WINDOW/
VSM_WF_RECTANGLE
VSM_WF_REORG
VSM_WF_SELECT_WINDOW
VSM_WF_WINDOW_STYLES