Summary About MFC CWND :: Invalidate () to use

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/qq_26771629/article/details/52680043

1. function prototype

 void Invalidate(BOOL bErase = TRUE);
2.bErase parameters

   If the default value (TRUE), the function is not invoked onPaint; otherwise call.

3. Special attention

   After an internal function calls the method, and does not update the window immediately, but only after the implementation of functions such as updating.

   Which means: If you draw a picture immediately after Invalidate, the picture will not be displayed.

   Solution: immediately after Invalidate call updateWindow ().

Guess you like

Origin blog.csdn.net/qq_26771629/article/details/52680043
Recommended