When a part of the window needs to be repainted, the area is marked as invalid, and when I repaint the area (in the WM_PAINT
event handler), I should mark the area as valid.
But I don't understand what is the need for marking the area as invalid and then validating it later, I mean why not just do the following: when an area needs to be repainted, just send a WM_PAINT
message (without marking the area as invalid) and then just repaint the area (without marking it as valid).