Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding 'modified' tooltip
Message
De
27/09/2005 06:29:55
 
 
À
27/09/2005 05:44:50
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01051669
Message ID:
01053346
Vues:
23
Viv,

The GetRandomRgn function allows you to get the visible clipping region of any window and is not a funky version of rand() for clipping regions ;-)
[DllImport("gdi32.dll")]
static extern int GetRandomRgn(IntPtr hdc, IntPtr hrgn, int iNum);

//
// Possible iNum values.
// 
// 1=DC's Clip Region
// 2=DC's Meta Region
// 3=DC's Intersection of 1 and 2
// 4=System Region
//
Once you have your clip region you can the use the GetRegionData() function to get at the individual rectangles that make up the region.

You can use this to test to see if you window is completely obscured and play nice with OS instead of wasting cycles doing things like animation etc.

Regards
Neil
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform