General information
Category:
Coding, syntax and commands
Hi,
>
If you are painting your control in response to a WM_PAINT message you may experience problems using the stock tooltip control. This is because the tooltip control is saving the background to alleviate redraws using the CS_SAVEBITS window style. This is not normally a problem but if you start to take more control over drawing your client area then stock tooltips will not cut it.
>
Interesting point. I've not tried to test this but from docs on CS_SAVEBITS:
Saves, as a bitmap, the portion of the screen image obscured by a window of this class. When the window is removed, the system uses the saved bitmap to restore the screen image, including other windows that were obscured. Therefore, the system does not send WM_PAINT messages to windows that were obscured if the memory used by the bitmap has not been discarded and if other screen actions have not invalidated the stored image.
It's the bold bit that intrigues me. It implies such a windows class 'knows' that its bitmap is invalid - which in turn, AFAIK, implies that it has itself been invalidated. In that case I don't see why it doesn't just refresh the bitmap before its own Paint and still not send the WM_PAINT. However the docs imply that this doesn't happen and that a WM_PAINT IS sent under these circumstances. If this is true I still don't see a problem with the final result.
Regards,
Viv
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only