Home > Software engineering >  MFC Popup window pops up occasionally become white first, and then draw a fill color?
MFC Popup window pops up occasionally become white first, and then draw a fill color?

Time:10-23

Created using the
 CWnd: : CreateEx (WS_EX_TOOLWINDOW, AfxRegisterWndClass (0), NULL, WS_POPUP | WS_BORDER, CRect,0,0,0 (0), this, NULL); 

The defined
 BOOL CWndMenuItem: : OnEraseBkgnd (pDC) CDC * 
{
Return TRUE;
}

Message map also have no problem, the Popup window pop up occasionally become white first, then draw into fill color (OnPaint use double buffer drawing)

CodePudding user response:

You are not what's in your window thread complex data processing?

CodePudding user response:

Try to change class registration parameters AfxRegisterWndClass (CS_OWNDC | CS_HREDRAW | CS_VREDRAW | CS_SAVEBITS);

CodePudding user response:

How did you write your OnPaint () function?
  • Related