Michael Kaufmann : static control: Don't load OEM bitmaps.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jan 17 09:29:39 CST 2006


Module: wine
Branch: refs/heads/master
Commit: 97be4fa91dda4d5a6efd8b1c04e3c8a63810cac8
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=97be4fa91dda4d5a6efd8b1c04e3c8a63810cac8

Author: Michael Kaufmann <hallo at michael-kaufmann.ch>
Date:   Tue Jan 17 16:07:10 2006 +0100

static control: Don't load OEM bitmaps.

---

 dlls/user/static.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/dlls/user/static.c b/dlls/user/static.c
index 212f4c6..4898b91 100644
--- a/dlls/user/static.c
+++ b/dlls/user/static.c
@@ -278,10 +278,8 @@ static HICON STATIC_LoadIconW( HWND hwnd
 static HBITMAP STATIC_LoadBitmapA( HWND hwnd, LPCSTR name )
 {
     HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE );
-    HBITMAP hbitmap = LoadBitmapA( hInstance, name );
-    if (!hbitmap)  /* Try OEM icon (FIXME: is this right?) */
-        hbitmap = LoadBitmapA( 0, name );
-    return hbitmap;
+    /* Windows doesn't try to load OEM Bitmaps (hInstance == NULL) */
+    return LoadBitmapA( hInstance, name );
 }
 
 /***********************************************************************
@@ -292,10 +290,8 @@ static HBITMAP STATIC_LoadBitmapA( HWND 
 static HBITMAP STATIC_LoadBitmapW( HWND hwnd, LPCWSTR name )
 {
     HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE );
-    HBITMAP hbitmap = LoadBitmapW( hInstance, name );
-    if (!hbitmap)  /* Try OEM icon (FIXME: is this right?) */
-        hbitmap = LoadBitmapW( 0, name );
-    return hbitmap;
+    /* Windows doesn't try to load OEM Bitmaps (hInstance == NULL) */
+    return LoadBitmapW( hInstance, name );
 }
 
 /***********************************************************************




More information about the wine-cvs mailing list