Fixed GetIconInfo16 (.spec,ICONINFO struct is different for Win16/Win32).

This commit is contained in:
Marcus Meissner 1999-01-28 09:14:38 +00:00 committed by Alexandre Julliard
parent f0a3545699
commit ffb912e692
5 changed files with 32 additions and 13 deletions

View File

@ -1206,7 +1206,7 @@ ImageList_GetDragImage (POINT32 *ppt, POINT32 *pptHotspot)
HICON32 WINAPI HICON32 WINAPI
ImageList_GetIcon (HIMAGELIST himl, INT32 i, UINT32 fStyle) ImageList_GetIcon (HIMAGELIST himl, INT32 i, UINT32 fStyle)
{ {
ICONINFO ii; ICONINFO32 ii;
HICON32 hIcon; HICON32 hIcon;
HDC32 hdcSrc, hdcDst; HDC32 hdcSrc, hdcDst;
INT32 nWidth, nHeight; INT32 nWidth, nHeight;
@ -1428,7 +1428,7 @@ ImageList_LoadImage32A (HINSTANCE32 hi, LPCSTR lpbmp, INT32 cx, INT32 cGrow,
ImageList_AddMasked (himl, (HBITMAP32)handle, clrMask); ImageList_AddMasked (himl, (HBITMAP32)handle, clrMask);
} }
else if ((uType == IMAGE_ICON) || (uType == IMAGE_CURSOR)) { else if ((uType == IMAGE_ICON) || (uType == IMAGE_CURSOR)) {
ICONINFO ii; ICONINFO32 ii;
BITMAP32 bmp; BITMAP32 bmp;
GetIconInfo32 (handle, &ii); GetIconInfo32 (handle, &ii);
@ -1492,7 +1492,7 @@ ImageList_LoadImage32W (HINSTANCE32 hi, LPCWSTR lpbmp, INT32 cx, INT32 cGrow,
ImageList_AddMasked (himl, (HBITMAP32)handle, clrMask); ImageList_AddMasked (himl, (HBITMAP32)handle, clrMask);
} }
else if ((uType == IMAGE_ICON) || (uType == IMAGE_CURSOR)) { else if ((uType == IMAGE_ICON) || (uType == IMAGE_CURSOR)) {
ICONINFO ii; ICONINFO32 ii;
BITMAP32 bmp; BITMAP32 bmp;
GetIconInfo32 (handle, &ii); GetIconInfo32 (handle, &ii);
@ -1866,7 +1866,7 @@ ImageList_ReplaceIcon (HIMAGELIST himl, INT32 i, HICON32 hIcon)
HDC32 hdcImageList, hdcImage; HDC32 hdcImageList, hdcImage;
INT32 nIndex; INT32 nIndex;
HBITMAP32 hbmOldSrc, hbmOldDst; HBITMAP32 hbmOldSrc, hbmOldDst;
ICONINFO ii; ICONINFO32 ii;
BITMAP32 bmp; BITMAP32 bmp;
TRACE (imagelist, "(0x%lx 0x%x 0x%x)\n", (DWORD)himl, i, hIcon); TRACE (imagelist, "(0x%lx 0x%x 0x%x)\n", (DWORD)himl, i, hIcon);

View File

@ -363,7 +363,7 @@ file user.exe
390 pascal16 CopyImage(word word word word word) CopyImage16 390 pascal16 CopyImage(word word word word word) CopyImage16
391 stub SignalProc32 391 stub SignalProc32
394 pascal16 DrawIconEx(word word word word word word word word word) DrawIconEx16 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 397 pascal16 RegisterClassEx(ptr) RegisterClassEx16
398 pascal16 GetClassInfoEx(word segstr ptr) GetClassInfoEx16 398 pascal16 GetClassInfoEx(word segstr ptr) GetClassInfoEx16
399 pascal16 ChildWindowFromPointEx(word long word) ChildWindowFromPointEx16 399 pascal16 ChildWindowFromPointEx(word long word) ChildWindowFromPointEx16

View File

@ -77,6 +77,14 @@ typedef struct
BYTE bBitsPerPixel; BYTE bBitsPerPixel;
} CURSORICONINFO; } CURSORICONINFO;
typedef struct {
BOOL16 fIcon;
WORD xHotspot;
WORD yHotspot;
HBITMAP16 hbmMask;
HBITMAP16 hbmColor;
} ICONINFO16,*LPICONINFO16;
typedef struct typedef struct
{ {
BYTE fVirt; BYTE fVirt;
@ -352,7 +360,7 @@ INT16 WINAPI GetDlgItemText16(HWND16,INT16,SEGPTR,UINT16);
UINT16 WINAPI GetDoubleClickTime16(void); UINT16 WINAPI GetDoubleClickTime16(void);
HWND16 WINAPI GetFocus16(void); HWND16 WINAPI GetFocus16(void);
HWND16 WINAPI GetForegroundWindow16(void); HWND16 WINAPI GetForegroundWindow16(void);
BOOL16 WINAPI GetIconInfo16(HICON16,LPICONINFO); BOOL16 WINAPI GetIconInfo16(HICON16,LPICONINFO16);
BOOL16 WINAPI GetInputState16(void); BOOL16 WINAPI GetInputState16(void);
UINT16 WINAPI GetInternalWindowPos16(HWND16,LPRECT16,LPPOINT16); UINT16 WINAPI GetInternalWindowPos16(HWND16,LPRECT16,LPPOINT16);
INT16 WINAPI GetKeyboardLayoutName16(LPSTR); INT16 WINAPI GetKeyboardLayoutName16(LPSTR);

View File

@ -117,7 +117,10 @@ typedef struct {
DWORD yHotspot; DWORD yHotspot;
HBITMAP32 hbmMask; HBITMAP32 hbmMask;
HBITMAP32 hbmColor; 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 */ /* this is the 6 byte accel struct used in Win32 when presented to the user */
typedef struct typedef struct
@ -638,7 +641,7 @@ WORD WINAPI CascadeWindows (HWND32, UINT32, const LPRECT32,
INT32 WINAPI CopyAcceleratorTable32A(HACCEL32,LPACCEL32,INT32); INT32 WINAPI CopyAcceleratorTable32A(HACCEL32,LPACCEL32,INT32);
INT32 WINAPI CopyAcceleratorTable32W(HACCEL32,LPACCEL32,INT32); INT32 WINAPI CopyAcceleratorTable32W(HACCEL32,LPACCEL32,INT32);
#define CopyAcceleratorTable WINELIB_NAME_AW(CopyAcceleratorTable) #define CopyAcceleratorTable WINELIB_NAME_AW(CopyAcceleratorTable)
HICON32 WINAPI CreateIconIndirect(LPICONINFO); HICON32 WINAPI CreateIconIndirect(LPICONINFO32);
BOOL32 WINAPI DestroyAcceleratorTable(HACCEL32); BOOL32 WINAPI DestroyAcceleratorTable(HACCEL32);
BOOL32 WINAPI EnumDisplayMonitors(HDC32,LPRECT32,MONITORENUMPROC,LPARAM); BOOL32 WINAPI EnumDisplayMonitors(HDC32,LPRECT32,MONITORENUMPROC,LPARAM);
INT32 WINAPI EnumPropsEx32A(HWND32,PROPENUMPROCEX32A,LPARAM); INT32 WINAPI EnumPropsEx32A(HWND32,PROPENUMPROCEX32A,LPARAM);
@ -646,7 +649,7 @@ INT32 WINAPI EnumPropsEx32W(HWND32,PROPENUMPROCEX32W,LPARAM);
#define EnumPropsEx WINELIB_NAME_AW(EnumPropsEx) #define EnumPropsEx WINELIB_NAME_AW(EnumPropsEx)
BOOL32 WINAPI EnumThreadWindows(DWORD,WNDENUMPROC32,LPARAM); BOOL32 WINAPI EnumThreadWindows(DWORD,WNDENUMPROC32,LPARAM);
BOOL32 WINAPI ExitWindowsEx(UINT32,DWORD); BOOL32 WINAPI ExitWindowsEx(UINT32,DWORD);
BOOL32 WINAPI GetIconInfo32(HICON32,LPICONINFO); BOOL32 WINAPI GetIconInfo32(HICON32,LPICONINFO32);
#define GetIconInfo WINELIB_NAME(GetIconInfo) #define GetIconInfo WINELIB_NAME(GetIconInfo)
DWORD WINAPI GetMenuContextHelpId32(HMENU32); DWORD WINAPI GetMenuContextHelpId32(HMENU32);
#define GetMenuContextHelpId WINELIB_NAME(GetMenuContextHelpId) #define GetMenuContextHelpId WINELIB_NAME(GetMenuContextHelpId)

View File

@ -1567,15 +1567,23 @@ HICON32 WINAPI LoadIcon32A(HINSTANCE32 hInstance, LPCSTR name)
/********************************************************************** /**********************************************************************
* GetIconInfo16 (USER.395) * 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) * GetIconInfo32 (USER32.242)
*/ */
BOOL32 WINAPI GetIconInfo32(HICON32 hIcon,LPICONINFO iconinfo) { BOOL32 WINAPI GetIconInfo32(HICON32 hIcon,LPICONINFO32 iconinfo) {
CURSORICONINFO *ciconinfo; CURSORICONINFO *ciconinfo;
ciconinfo = GlobalLock16(hIcon); ciconinfo = GlobalLock16(hIcon);
@ -1601,7 +1609,7 @@ BOOL32 WINAPI GetIconInfo32(HICON32 hIcon,LPICONINFO iconinfo) {
/********************************************************************** /**********************************************************************
* CreateIconIndirect (USER32.78) * CreateIconIndirect (USER32.78)
*/ */
HICON32 WINAPI CreateIconIndirect(LPICONINFO iconinfo) { HICON32 WINAPI CreateIconIndirect(LPICONINFO32 iconinfo) {
BITMAPOBJ *bmpXor,*bmpAnd; BITMAPOBJ *bmpXor,*bmpAnd;
HICON32 hObj; HICON32 hObj;
int sizeXor,sizeAnd; int sizeXor,sizeAnd;