Static control [07/10]: Don't load OEM bitmaps

Michael Kaufmann hallo at michael-kaufmann.ch
Wed Jan 11 16:44:22 CST 2006


-------------- next part --------------
--- static-old.c	2006-01-11 22:45:02.000000000 +0100
+++ static.c	2006-01-11 22:48:18.000000000 +0100
@@ -278,10 +278,8 @@
 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_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-patches mailing list