Alexandre Julliard : user: Add icon handle mapping in the Get/SetClassWord/ Long functions.
Alexandre Julliard
julliard at winehq.org
Wed Feb 3 09:33:05 CST 2010
Module: wine
Branch: master
Commit: 6806451db38e2b656e4dc959900070a409f8ca7f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6806451db38e2b656e4dc959900070a409f8ca7f
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Feb 3 12:18:30 2010 +0100
user: Add icon handle mapping in the Get/SetClassWord/Long functions.
---
dlls/user.exe16/window.c | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/dlls/user.exe16/window.c b/dlls/user.exe16/window.c
index b617c4d..e81d9ac 100644
--- a/dlls/user.exe16/window.c
+++ b/dlls/user.exe16/window.c
@@ -747,6 +747,16 @@ void WINAPI ValidateRgn16( HWND16 hwnd, HRGN16 hrgn )
*/
WORD WINAPI GetClassWord16( HWND16 hwnd, INT16 offset )
{
+ HICON icon;
+
+ switch (offset)
+ {
+ case GCLP_HCURSOR:
+ case GCLP_HICON:
+ case GCLP_HICONSM:
+ icon = (HICON)GetClassLongPtrW( WIN_Handle32(hwnd), offset );
+ return get_icon_16( icon );
+ }
return GetClassWord( WIN_Handle32(hwnd), offset );
}
@@ -756,6 +766,16 @@ WORD WINAPI GetClassWord16( HWND16 hwnd, INT16 offset )
*/
WORD WINAPI SetClassWord16( HWND16 hwnd, INT16 offset, WORD newval )
{
+ HICON icon;
+
+ switch (offset)
+ {
+ case GCLP_HCURSOR:
+ case GCLP_HICON:
+ case GCLP_HICONSM:
+ icon = (HICON)SetClassLongPtrW( WIN_Handle32(hwnd), offset, (ULONG_PTR)get_icon_32(newval) );
+ return get_icon_16( icon );
+ }
return SetClassWord( WIN_Handle32(hwnd), offset, newval );
}
@@ -773,6 +793,10 @@ LONG WINAPI GetClassLong16( HWND16 hwnd16, INT16 offset )
return (LONG_PTR)WINPROC_GetProc16( (WNDPROC)ret, FALSE );
case GCLP_MENUNAME:
return MapLS( (void *)ret ); /* leak */
+ case GCLP_HCURSOR:
+ case GCLP_HICON:
+ case GCLP_HICONSM:
+ return get_icon_16( (HICON)ret );
default:
return ret;
}
@@ -784,8 +808,15 @@ LONG WINAPI GetClassLong16( HWND16 hwnd16, INT16 offset )
*/
LONG WINAPI SetClassLong16( HWND16 hwnd16, INT16 offset, LONG newval )
{
+ HICON icon;
+
switch( offset )
{
+ case GCLP_HCURSOR:
+ case GCLP_HICON:
+ case GCLP_HICONSM:
+ icon = (HICON)SetClassLongPtrW( WIN_Handle32(hwnd16), offset, (ULONG_PTR)get_icon_32(newval) );
+ return get_icon_16( icon );
case GCLP_WNDPROC:
{
WNDPROC new_proc = WINPROC_AllocProc16( (WNDPROC16)newval );
More information about the wine-cvs
mailing list