BOOL CALLBACK AboutDlgProc (HWND hDlg, UINT message,
WPARAM wParam, LPARAM lParam)
{
PAINTSTRUCT ps;
static HWND hCtrlBlock ;
static int iColor, iFigure ;
switch (message)
{
case WM_PAINT:
PaintTheBlock (hCtrlBlock, iColor, iFigure) ;
break ;
}
}
I use
if (DialogBox (hInstance, TEXT ("AboutBox"), hwnd, AboutDlgProc))
InvalidateRect (hwnd, NULL, TRUE) ;
Carry out a about dlg with MSG_proc
AboutDlgProc
void PaintTheBlock (HWND hCtrl, int iColor, int iFigure)
{
InvalidateRect (hCtrl, NULL, TRUE) ;
UpdateWindow (hCtrl) ;
PaintWindow (hCtrl, iColor, iFigure);
}
Inside PaintTheBlock body,Why
InvalidateRect (hCtrl, NULL, TRUE) ; //May motivate a paint MSG,but why don't ?
UpdateWindow (hCtrl) ;
Do not motivate another Paint-MSG as expected?
Thanks in advcance!