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.
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 ().