[PATCH] user32: warn on LoadImage width 0x0 size and no LR_DEFAULTSIZE
Marcus Meissner
meissner at suse.de
Thu Jan 27 09:25:38 CST 2011
Hi,
Causes my "Icon not visible" problem ... There is a 0x0 resource
which gets loaded.
Behaviour should be loading the first icon/cursor resource in this
case.
Ciao, Marcus
---
dlls/user32/cursoricon.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c
index fcb5d75..fc95203 100644
--- a/dlls/user32/cursoricon.c
+++ b/dlls/user32/cursoricon.c
@@ -2281,7 +2281,14 @@ HANDLE WINAPI LoadImageW( HINSTANCE hinst, LPCWSTR name, UINT type,
if (!desiredx) desiredx = GetSystemMetrics(SM_CXCURSOR);
if (!desiredy) desiredy = GetSystemMetrics(SM_CYCURSOR);
}
+ } else {
+ if (type == IMAGE_ICON) {
+ if (!desiredx && !desiredy) FIXME("needs to use size of first icon resource - using smallest.\n");
+ } else if (type == IMAGE_CURSOR) {
+ if (!desiredx && !desiredy) FIXME("needs to use size of first cursor resource - using smallest.\n");
+ }
}
+
if (loadflags & LR_LOADFROMFILE) loadflags &= ~LR_SHARED;
switch (type) {
case IMAGE_BITMAP:
--
1.7.1
More information about the wine-patches
mailing list