Attempt to solve the imfamous WM_NCPAINT handle leak. The message handler isn't required to delete the region handle while it's also valid to delete it (eg. by calling GetDCEx with it). Thus we have to send the WM_NCPAINT message only synchronously and verify the handle after the SendMessage call.

svn path=/trunk/; revision=13366
This commit is contained in:
Filip Navara
2005-01-30 12:56:12 +00:00
parent fb16822055
commit fe2f2f66fc
3 changed files with 57 additions and 41 deletions
+2
View File
@@ -51,6 +51,8 @@
#define GDI_OBJECT_TYPE_MEMDC 0x00750000
#define GDI_OBJECT_TYPE_DCE 0x00770000
#define GDI_OBJECT_TYPE_DONTCARE 0x007f0000
/** Not really an object type. Forces GDI_FreeObj to be silent. */
#define GDI_OBJECT_TYPE_SILENT 0x80000000
/*@}*/
typedef PVOID PGDIOBJ;