FPCN_PAINT_STAGE
Syntax
FPCN_PAINT_STAGE
#define DEF_F_IN_BOX__PREPAINT_STAGE (0)
#define DEF_F_IN_BOX__AFTERPAINT_STAGE (1)
typedef struct SFPCNPaintStage
{
NMHDR hdr;
DWORD dwStage; // DEF_F_IN_BOX__*
HDC hdc;
} SFPCNPaintStage;
Description
The FPCN_PAINT_STAGE
notification is sent when an F-IN-BOX window is created with the FPCS_TRANSPARENT
style.
It is triggered at two stages of the painting process:
DEF_F_IN_BOX__PREPAINT_STAGE
— before the Flash content is painted (background stage).DEF_F_IN_BOX__AFTERPAINT_STAGE
— after the Flash content is painted (movie stage).
This allows developers to implement custom rendering and simulate transparency for a Flash window created as a child control.
Example
HWND hwnd_F_IN_BOX;
...
FPCSetEventListener(hwnd_F_IN_BOX, &EventListener, 0);
...
void WINAPI EventListener(HWND hwndFlashPlayerControl, LPARAM lParam, NMHDR* lpNMHDR)
{
if (FPCN_PAINT_STAGE == lpNMHDR->code)
{
SFPCNPaintStage* info = (SFPCNPaintStage*)lpNMHDR;
if (DEF_F_IN_BOX__PREPAINT_STAGE == info->dwStage)
{
RECT rc;
::GetClientRect(lpNMHDR->hwndFrom, &rc);
// Fill background before Flash paints
FillRect(info->hdc, &rc, GetSysColorBrush(COLOR_BTNFACE));
}
}
}