diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c index d2af0b8db49..0650a65ad9e 100644 --- a/dlls/comctl32/imagelist.c +++ b/dlls/comctl32/imagelist.c @@ -1206,7 +1206,7 @@ ImageList_GetDragImage (POINT32 *ppt, POINT32 *pptHotspot) HICON32 WINAPI ImageList_GetIcon (HIMAGELIST himl, INT32 i, UINT32 fStyle) { - ICONINFO ii; + ICONINFO32 ii; HICON32 hIcon; HDC32 hdcSrc, hdcDst; INT32 nWidth, nHeight; @@ -1428,7 +1428,7 @@ ImageList_LoadImage32A (HINSTANCE32 hi, LPCSTR lpbmp, INT32 cx, INT32 cGrow, ImageList_AddMasked (himl, (HBITMAP32)handle, clrMask); } else if ((uType == IMAGE_ICON) || (uType == IMAGE_CURSOR)) { - ICONINFO ii; + ICONINFO32 ii; BITMAP32 bmp; GetIconInfo32 (handle, &ii); @@ -1492,7 +1492,7 @@ ImageList_LoadImage32W (HINSTANCE32 hi, LPCWSTR lpbmp, INT32 cx, INT32 cGrow, ImageList_AddMasked (himl, (HBITMAP32)handle, clrMask); } else if ((uType == IMAGE_ICON) || (uType == IMAGE_CURSOR)) { - ICONINFO ii; + ICONINFO32 ii; BITMAP32 bmp; GetIconInfo32 (handle, &ii); @@ -1866,7 +1866,7 @@ ImageList_ReplaceIcon (HIMAGELIST himl, INT32 i, HICON32 hIcon) HDC32 hdcImageList, hdcImage; INT32 nIndex; HBITMAP32 hbmOldSrc, hbmOldDst; - ICONINFO ii; + ICONINFO32 ii; BITMAP32 bmp; TRACE (imagelist, "(0x%lx 0x%x 0x%x)\n", (DWORD)himl, i, hIcon); diff --git a/if1632/user.spec b/if1632/user.spec index 3fbe12836ec..f4abf04eafe 100644 --- a/if1632/user.spec +++ b/if1632/user.spec @@ -363,7 +363,7 @@ file user.exe 390 pascal16 CopyImage(word word word word word) CopyImage16 391 stub SignalProc32 394 pascal16 DrawIconEx(word word word word word word word word word) DrawIconEx16 -395 pascal16 GetIconInfo(word long) GetIconInfo16 +395 pascal16 GetIconInfo(word ptr) GetIconInfo16 397 pascal16 RegisterClassEx(ptr) RegisterClassEx16 398 pascal16 GetClassInfoEx(word segstr ptr) GetClassInfoEx16 399 pascal16 ChildWindowFromPointEx(word long word) ChildWindowFromPointEx16 diff --git a/include/wine/winuser16.h b/include/wine/winuser16.h index 84411f67183..082193ea2b2 100644 --- a/include/wine/winuser16.h +++ b/include/wine/winuser16.h @@ -77,6 +77,14 @@ typedef struct BYTE bBitsPerPixel; } CURSORICONINFO; +typedef struct { + BOOL16 fIcon; + WORD xHotspot; + WORD yHotspot; + HBITMAP16 hbmMask; + HBITMAP16 hbmColor; +} ICONINFO16,*LPICONINFO16; + typedef struct { BYTE fVirt; @@ -352,7 +360,7 @@ INT16 WINAPI GetDlgItemText16(HWND16,INT16,SEGPTR,UINT16); UINT16 WINAPI GetDoubleClickTime16(void); HWND16 WINAPI GetFocus16(void); HWND16 WINAPI GetForegroundWindow16(void); -BOOL16 WINAPI GetIconInfo16(HICON16,LPICONINFO); +BOOL16 WINAPI GetIconInfo16(HICON16,LPICONINFO16); BOOL16 WINAPI GetInputState16(void); UINT16 WINAPI GetInternalWindowPos16(HWND16,LPRECT16,LPPOINT16); INT16 WINAPI GetKeyboardLayoutName16(LPSTR); diff --git a/include/winuser.h b/include/winuser.h index cca5e171858..e078a813a2d 100644 --- a/include/winuser.h +++ b/include/winuser.h @@ -117,7 +117,10 @@ typedef struct { DWORD yHotspot; HBITMAP32 hbmMask; HBITMAP32 hbmColor; -} ICONINFO,*LPICONINFO; +} ICONINFO32,*LPICONINFO32; + +DECL_WINELIB_TYPE(ICONINFO); +DECL_WINELIB_TYPE(LPICONINFO); /* this is the 6 byte accel struct used in Win32 when presented to the user */ typedef struct @@ -638,7 +641,7 @@ WORD WINAPI CascadeWindows (HWND32, UINT32, const LPRECT32, INT32 WINAPI CopyAcceleratorTable32A(HACCEL32,LPACCEL32,INT32); INT32 WINAPI CopyAcceleratorTable32W(HACCEL32,LPACCEL32,INT32); #define CopyAcceleratorTable WINELIB_NAME_AW(CopyAcceleratorTable) -HICON32 WINAPI CreateIconIndirect(LPICONINFO); +HICON32 WINAPI CreateIconIndirect(LPICONINFO32); BOOL32 WINAPI DestroyAcceleratorTable(HACCEL32); BOOL32 WINAPI EnumDisplayMonitors(HDC32,LPRECT32,MONITORENUMPROC,LPARAM); INT32 WINAPI EnumPropsEx32A(HWND32,PROPENUMPROCEX32A,LPARAM); @@ -646,7 +649,7 @@ INT32 WINAPI EnumPropsEx32W(HWND32,PROPENUMPROCEX32W,LPARAM); #define EnumPropsEx WINELIB_NAME_AW(EnumPropsEx) BOOL32 WINAPI EnumThreadWindows(DWORD,WNDENUMPROC32,LPARAM); BOOL32 WINAPI ExitWindowsEx(UINT32,DWORD); -BOOL32 WINAPI GetIconInfo32(HICON32,LPICONINFO); +BOOL32 WINAPI GetIconInfo32(HICON32,LPICONINFO32); #define GetIconInfo WINELIB_NAME(GetIconInfo) DWORD WINAPI GetMenuContextHelpId32(HMENU32); #define GetMenuContextHelpId WINELIB_NAME(GetMenuContextHelpId) diff --git a/objects/cursoricon.c b/objects/cursoricon.c index 392d0278dae..9cc8cdc73aa 100644 --- a/objects/cursoricon.c +++ b/objects/cursoricon.c @@ -1567,15 +1567,23 @@ HICON32 WINAPI LoadIcon32A(HINSTANCE32 hInstance, LPCSTR name) /********************************************************************** * GetIconInfo16 (USER.395) */ -BOOL16 WINAPI GetIconInfo16(HICON16 hIcon,LPICONINFO iconinfo) +BOOL16 WINAPI GetIconInfo16(HICON16 hIcon,LPICONINFO16 iconinfo) { - return (BOOL16)GetIconInfo32((HICON32)hIcon, iconinfo); + ICONINFO32 ii32; + BOOL16 ret = GetIconInfo32((HICON32)hIcon, &ii32); + + iconinfo->fIcon = ii32.fIcon; + iconinfo->xHotspot = ii32.xHotspot; + iconinfo->yHotspot = ii32.yHotspot; + iconinfo->hbmMask = ii32.hbmMask; + iconinfo->hbmColor = ii32.hbmColor; + return ret; } /********************************************************************** * GetIconInfo32 (USER32.242) */ -BOOL32 WINAPI GetIconInfo32(HICON32 hIcon,LPICONINFO iconinfo) { +BOOL32 WINAPI GetIconInfo32(HICON32 hIcon,LPICONINFO32 iconinfo) { CURSORICONINFO *ciconinfo; ciconinfo = GlobalLock16(hIcon); @@ -1601,7 +1609,7 @@ BOOL32 WINAPI GetIconInfo32(HICON32 hIcon,LPICONINFO iconinfo) { /********************************************************************** * CreateIconIndirect (USER32.78) */ -HICON32 WINAPI CreateIconIndirect(LPICONINFO iconinfo) { +HICON32 WINAPI CreateIconIndirect(LPICONINFO32 iconinfo) { BITMAPOBJ *bmpXor,*bmpAnd; HICON32 hObj; int sizeXor,sizeAnd;