Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding 'modified' tooltip
Message
De
22/09/2005 05:03:01
 
 
À
21/09/2005 12:32:16
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01051669
Message ID:
01051879
Vues:
17
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform