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

FPCN_PAINT_STAGE

Message

[ C++ ]
  1. FPCN_PAINT_STAGE  

Structure

[ C++ ]
  1. #define DEF_F_IN_BOX__PREPAINT_STAGE        (0)  
  2. #define DEF_F_IN_BOX__AFTERPAINT_STAGE      (1)  
  3.   
  4. typedef struct SFPCNPaintStage  
  5. {  
  6.    NMHDR hdr;  
  7.   
  8.    DWORD dwStage; // DEF_F_IN_BOX__*  
  9.    HDC hdc;  
  10.   
  11. } 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++ ]
  1. HWND hwnd_F_IN_BOX;  
  2. ...  
  3. FPCSetEventListener(hwnd_F_IN_BOX, &EventListener, 0);  
  4. ...  
  5. void WINAPI EventListener(HWND hwndFlashPlayerControl, LPARAM lParam, NMHDR* lpNMHDR)  
  6. {  
  7.     if (FPCN_PAINT_STAGE == lpNMHDR->code)  
  8.     {  
  9.         SFPCNPaintStage* info = (SFPCNPaintStage*)lpNMHDR;  
  10.   
  11.         if (DEF_F_IN_BOX__PREPAINT_STAGE == info->dwStage)  
  12.         {  
  13.             RECT rc;  
  14.             ::GetClientRect(lpNMHDR->hwndFrom, &rc);  
  15.   
  16.             FillRect(info->hdc, &rc, GetSysColorBrush(COLOR_BTNFACE));  
  17.         }  
  18.     }  
  19. }  


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