可以调用的,参考;下载我的“ScrollBitmap.rar”(0)分: 其中有2句: case IDOK:// "Exit" m_Ok.SendMessage(WM_PAINT,(WPARAM)dcMem.m_hDC,0); prompt="\"Exit\" button has been copied to clipbroad!"; break; case IDC_PICTURE:// m_Pic OnMyPaint((WPARAM)dcMem.m_hDC,0); prompt="\"CStatic Picture\" has been copied to clipbroad!"; break; //OnMyPaint=OnPaint
MSDN上有句话: The WM_PAINT message is generated by the system and should not be sent by an application.
InvalidateRect()
等类似的函数都是提供给你“手动”掉OnPaint的
其中有2句:
case IDOK:// "Exit"
m_Ok.SendMessage(WM_PAINT,(WPARAM)dcMem.m_hDC,0);
prompt="\"Exit\" button has been copied to clipbroad!";
break;
case IDC_PICTURE:// m_Pic
OnMyPaint((WPARAM)dcMem.m_hDC,0);
prompt="\"CStatic Picture\" has been copied to clipbroad!";
break;
//OnMyPaint=OnPaint
The WM_PAINT message is generated by the system and should not be sent by an application.