Commit 97be4fa9 authored by Michael Kaufmann's avatar Michael Kaufmann Committed by Alexandre Julliard

static control: Don't load OEM bitmaps.

parent 2ddbc7b6
...@@ -278,10 +278,8 @@ static HICON STATIC_LoadIconW( HWND hwnd, LPCWSTR name, DWORD style ) ...@@ -278,10 +278,8 @@ static HICON STATIC_LoadIconW( HWND hwnd, LPCWSTR name, DWORD style )
static HBITMAP STATIC_LoadBitmapA( HWND hwnd, LPCSTR name ) static HBITMAP STATIC_LoadBitmapA( HWND hwnd, LPCSTR name )
{ {
HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE ); HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE );
HBITMAP hbitmap = LoadBitmapA( hInstance, name ); /* Windows doesn't try to load OEM Bitmaps (hInstance == NULL) */
if (!hbitmap) /* Try OEM icon (FIXME: is this right?) */ return LoadBitmapA( hInstance, name );
hbitmap = LoadBitmapA( 0, name );
return hbitmap;
} }
/*********************************************************************** /***********************************************************************
...@@ -292,10 +290,8 @@ static HBITMAP STATIC_LoadBitmapA( HWND hwnd, LPCSTR name ) ...@@ -292,10 +290,8 @@ static HBITMAP STATIC_LoadBitmapA( HWND hwnd, LPCSTR name )
static HBITMAP STATIC_LoadBitmapW( HWND hwnd, LPCWSTR name ) static HBITMAP STATIC_LoadBitmapW( HWND hwnd, LPCWSTR name )
{ {
HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE ); HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE );
HBITMAP hbitmap = LoadBitmapW( hInstance, name ); /* Windows doesn't try to load OEM Bitmaps (hInstance == NULL) */
if (!hbitmap) /* Try OEM icon (FIXME: is this right?) */ return LoadBitmapW( hInstance, name );
hbitmap = LoadBitmapW( 0, name );
return hbitmap;
} }
/*********************************************************************** /***********************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment