F-IN-BOX DLL Edition Help >> Extensions >> Notifications

FPCN_PAINT_STAGE

Message

[ C++ ]
FPCN_PAINT_STAGE

Structure

[ C++ ]
#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

You should create an f-in-box window with FPCS_TRANSPARENT style to use FPCN_PAINT_STAGE. FPCN_PAINT_STAGE is called when:
  • a background is painted (dwStage == DEF_F_IN_BOX__PREPAINT_STAGE)
  • a movie is painted (dwStage == DEF_F_IN_BOX__AFTERPAINT_STAGE)
It's useful to simulate transparency for a f-in-box window created as a child control.

Here an example:

[ C++ ]
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);

			FillRect(info->hdc, &rc, GetSysColorBrush(COLOR_BTNFACE));
		}
	}
}


Copyright © Softanics. All rights reserved.
F-IN-BOX is a trademark of Softanics.
Macromedia and Shockwave Flash are trademarks of Adobe