Fix Tooltips to use DestroyIcon

jeffl jeffl at defcen.gov.au
Tue Nov 23 04:52:50 CST 2004


The tooltips.c patch is to use DestroyIcon instead of DeleteObject when 
doing TOOLTIPS_Unregister.  It appears that an Icon is recreated when 
doing TOOLTIPS_Register using loadimage, according to the function 
description, DestroyIcon should be used.  This seems to fix the problem 
I was having where LoadImage in TOOLTIPS_Register returned a Moveable 
Handle and TOOLTIPS_Unregister's call to DeleteObject would cause an 
exception invoking GDI_GetObjPtr in gdiobj.c and incorrectly assuming 
that the Movable Handle flag was indicating the GDI Heap Handle.

The second patch to cursoricon.c is to fix the return to correctly 
return TRUE|FALSE and SetLastError as per the function description.  The 
only problem is that I don't know what the correct value for 
SetLastError should be for this error.  Can anyone help with that?

Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cursoricon.diff
Type: application/octet-stream
Size: 640 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20041123/4d3c248f/cursoricon.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tooltips.diff
Type: application/octet-stream
Size: 600 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20041123/4d3c248f/tooltips.obj


More information about the wine-patches mailing list