Commit 8bb7fb96 authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed a number of incompatibilities in OEM icons/cursors handling.

parent ebc5fe96
...@@ -93,12 +93,18 @@ static BOOL FileDlg_Init(void) ...@@ -93,12 +93,18 @@ static BOOL FileDlg_Init(void)
CURSORICONINFO *fldrInfo; CURSORICONINFO *fldrInfo;
if (!initialized) { if (!initialized) {
if (!hFolder) hFolder = LoadIconA(0, MAKEINTRESOURCEA(OIC_FOLDER)); HINSTANCE inst = GetModuleHandleA( "comdlg32.dll" );
if (!hFolder2) hFolder2 = LoadIconA(0, MAKEINTRESOURCEA(OIC_FOLDER2)); if (!inst)
if (!hFloppy) hFloppy = LoadIconA(0, MAKEINTRESOURCEA(OIC_FLOPPY)); {
if (!hHDisk) hHDisk = LoadIconA(0, MAKEINTRESOURCEA(OIC_HDISK)); ERR( "cannot get comdlg32.dll instance\n" );
if (!hCDRom) hCDRom = LoadIconA(0, MAKEINTRESOURCEA(OIC_CDROM)); return FALSE;
if (!hNet) hNet = LoadIconA(0, MAKEINTRESOURCEA(OIC_NETWORK)); }
if (!hFolder) hFolder = LoadIconA( inst, "FOLDER" );
if (!hFolder2) hFolder2 = LoadIconA( inst, "FOLDER2" );
if (!hFloppy) hFloppy = LoadIconA( inst, "FLOPPY" );
if (!hHDisk) hHDisk = LoadIconA( inst, "HDISK" );
if (!hCDRom) hCDRom = LoadIconA( inst, "CDROM" );
if (!hNet) hNet = LoadIconA( inst, "NETWORK" );
if (hFolder == 0 || hFolder2 == 0 || hFloppy == 0 || if (hFolder == 0 || hFolder2 == 0 || hFloppy == 0 ||
hHDisk == 0 || hCDRom == 0 || hNet == 0) hHDisk == 0 || hCDRom == 0 || hNet == 0)
{ {
......
...@@ -754,7 +754,7 @@ BOOL WINAPI ShellAboutA( HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff, ...@@ -754,7 +754,7 @@ BOOL WINAPI ShellAboutA( HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff,
info.szApp = szApp; info.szApp = szApp;
info.szOtherStuff = szOtherStuff; info.szOtherStuff = szOtherStuff;
info.hIcon = hIcon; info.hIcon = hIcon;
if (!hIcon) info.hIcon = LoadIconA( 0, MAKEINTRESOURCEA(OIC_WINEICON) ); if (!hIcon) info.hIcon = LoadIconA( 0, IDI_WINLOGOA );
return DialogBoxIndirectParamA( GetWindowLongA( hWnd, GWL_HINSTANCE ), return DialogBoxIndirectParamA( GetWindowLongA( hWnd, GWL_HINSTANCE ),
template, hWnd, AboutDlgProc, (LPARAM)&info ); template, hWnd, AboutDlgProc, (LPARAM)&info );
} }
...@@ -780,7 +780,7 @@ BOOL WINAPI ShellAboutW( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, ...@@ -780,7 +780,7 @@ BOOL WINAPI ShellAboutW( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff,
info.szApp = HEAP_strdupWtoA( GetProcessHeap(), 0, szApp ); info.szApp = HEAP_strdupWtoA( GetProcessHeap(), 0, szApp );
info.szOtherStuff = HEAP_strdupWtoA( GetProcessHeap(), 0, szOtherStuff ); info.szOtherStuff = HEAP_strdupWtoA( GetProcessHeap(), 0, szOtherStuff );
info.hIcon = hIcon; info.hIcon = hIcon;
if (!hIcon) info.hIcon = LoadIconA( 0, MAKEINTRESOURCEA(OIC_WINEICON) ); if (!hIcon) info.hIcon = LoadIconA( 0, IDI_WINLOGOA );
ret = DialogBoxIndirectParamA( GetWindowLongA( hWnd, GWL_HINSTANCE ), ret = DialogBoxIndirectParamA( GetWindowLongA( hWnd, GWL_HINSTANCE ),
template, hWnd, AboutDlgProc, (LPARAM)&info ); template, hWnd, AboutDlgProc, (LPARAM)&info );
HeapFree( GetProcessHeap(), 0, (LPSTR)info.szApp ); HeapFree( GetProcessHeap(), 0, (LPSTR)info.szApp );
......
...@@ -373,26 +373,20 @@ typedef struct ...@@ -373,26 +373,20 @@ typedef struct
#define OCR_NO 32648 #define OCR_NO 32648
#define OCR_HAND 32649 #define OCR_HAND 32649
#define OCR_APPSTARTING 32650 #define OCR_APPSTARTING 32650
#ifdef __WINE__ #define OCR_HELP 32651
#define OCR_HELP 32651 /* only defined in wine */
#define OCR_BUMMER 32652 /* only defined in wine (FIXME) */
#define OCR_DRAGOBJECT 32653 #define OCR_DRAGOBJECT 32653
#endif
#define OIC_SAMPLE 32512 #define OIC_SAMPLE 32512
#define OIC_HAND 32513 #define OIC_HAND 32513
#define OIC_QUES 32514 #define OIC_QUES 32514
#define OIC_BANG 32515 #define OIC_BANG 32515
#define OIC_NOTE 32516 #define OIC_NOTE 32516
#define OIC_PORTRAIT 32517 #define OIC_WINLOGO 32517
#define OIC_LANDSCAPE 32518 #define OIC_WARNING OIC_BANG
#define OIC_WINEICON 32519 #define OIC_ERROR OIC_HAND
#define OIC_FOLDER 32520 #define OIC_INFORMATION OIC_NOTE
#define OIC_FOLDER2 32521
#define OIC_FLOPPY 32522
#define OIC_CDROM 32523
#define OIC_HDISK 32524
#define OIC_NETWORK 32525
#define COLOR_SCROLLBAR 0 #define COLOR_SCROLLBAR 0
#define COLOR_BACKGROUND 1 #define COLOR_BACKGROUND 1
...@@ -2158,9 +2152,6 @@ typedef struct ...@@ -2158,9 +2152,6 @@ typedef struct
#define IDI_ERROR IDI_HAND #define IDI_ERROR IDI_HAND
#define IDI_INFORMATION IDI_ASTERISK #define IDI_INFORMATION IDI_ASTERISK
#define IDC_BUMMERA MAKEINTRESOURCEA(100)
#define IDC_BUMMERW MAKEINTRESOURCEW(100)
#define IDC_BUMMER WINELIB_NAME_AW(IDC_BUMMER)
#define IDC_ARROWA MAKEINTRESOURCEA(32512) #define IDC_ARROWA MAKEINTRESOURCEA(32512)
#define IDC_ARROWW MAKEINTRESOURCEW(32512) #define IDC_ARROWW MAKEINTRESOURCEW(32512)
#define IDC_ARROW WINELIB_NAME_AW(IDC_ARROW) #define IDC_ARROW WINELIB_NAME_AW(IDC_ARROW)
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#define MAX_LANGUAGE_NUMBER (CL_LAST_LANGUAGE - CL_FIRST_LANGUAGE) #define MAX_LANGUAGE_NUMBER (CL_LAST_LANGUAGE - CL_FIRST_LANGUAGE)
#define HELPFILE "clock.hlp" #define HELPFILE "clock.hlp"
#define DEFAULTICON OIC_WINEICON #define DEFAULTICON OIC_WINLOGO
/* hide the following from winerc */ /* hide the following from winerc */
#ifndef RC_INVOKED #ifndef RC_INVOKED
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#define INVALID_HANDLE_VALUE INVALID_HANDLE_VALUE #define INVALID_HANDLE_VALUE INVALID_HANDLE_VALUE
#define WINE_RELEASE_INFO "Compiled using LCC" #define WINE_RELEASE_INFO "Compiled using LCC"
#define OIC_WINEICON 0 #define OIC_WINLOGO 0
#ifndef LCC_HASASSERT #ifndef LCC_HASASSERT
/* prevent multiple inclusion of assert methods */ /* prevent multiple inclusion of assert methods */
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#define HELPFILE "notepad.hlp" #define HELPFILE "notepad.hlp"
#define LOGPREFIX ".LOG" #define LOGPREFIX ".LOG"
#define DEFAULTICON OIC_WINEICON #define DEFAULTICON OIC_WINLOGO
/* hide the following from winerc */ /* hide the following from winerc */
#ifndef RC_INVOKED #ifndef RC_INVOKED
......
...@@ -51,7 +51,7 @@ ATOM GROUP_RegisterGroupWinClass() ...@@ -51,7 +51,7 @@ ATOM GROUP_RegisterGroupWinClass()
class.cbClsExtra = 0; class.cbClsExtra = 0;
class.cbWndExtra = sizeof(LONG); class.cbWndExtra = sizeof(LONG);
class.hInstance = Globals.hInstance; class.hInstance = Globals.hInstance;
class.hIcon = LoadIcon (0, MAKEINTRESOURCE(OIC_WINEICON)); class.hIcon = LoadIcon (0, IDI_WINLOGO);
class.hCursor = LoadCursor (0, IDC_ARROW); class.hCursor = LoadCursor (0, IDC_ARROW);
class.hbrBackground = GetStockObject (WHITE_BRUSH); class.hbrBackground = GetStockObject (WHITE_BRUSH);
class.lpszMenuName = 0; class.lpszMenuName = 0;
......
...@@ -16,11 +16,7 @@ ...@@ -16,11 +16,7 @@
#include "windows.h" #include "windows.h"
/* Fallback icon */ /* Fallback icon */
#ifdef WINELIB #define DEFAULTICON OIC_WINLOGO
#define DEFAULTICON OIC_WINEICON
#else
#define DEFAULTICON OIC_LANDSCAPE
#endif
/* Icon index in M$ Window's progman.exe */ /* Icon index in M$ Window's progman.exe */
#define PROGMAN_ICON_INDEX 0 #define PROGMAN_ICON_INDEX 0
......
...@@ -95,7 +95,7 @@ VOID PROGRAM_NewProgram(HLOCAL hGroup) ...@@ -95,7 +95,7 @@ VOID PROGRAM_NewProgram(HLOCAL hGroup)
&nCmdShow, MAX_PATHNAME_LEN)) &nCmdShow, MAX_PATHNAME_LEN))
return; return;
if (!hIcon) hIcon = LoadIcon(0, MAKEINTRESOURCE(OIC_WINEICON)); if (!hIcon) hIcon = LoadIcon(0, IDI_WINLOGO);
if (!PROGRAM_AddProgram(hGroup, hIcon, szName, 0, 0, szCmdLine, szIconFile, if (!PROGRAM_AddProgram(hGroup, hIcon, szName, 0, 0, szCmdLine, szIconFile,
......
...@@ -2907,7 +2907,7 @@ HICON16 NC_IconForWindow(WND *wndPtr) ...@@ -2907,7 +2907,7 @@ HICON16 NC_IconForWindow(WND *wndPtr)
/* If there is no hIcon specified and this is a modal dialog, */ /* If there is no hIcon specified and this is a modal dialog, */
/* get the default one. */ /* get the default one. */
if (!hIcon && (wndPtr->dwStyle & DS_MODALFRAME)) if (!hIcon && (wndPtr->dwStyle & DS_MODALFRAME))
hIcon = LoadImageA(0, MAKEINTRESOURCEA(OIC_WINEICON), IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR); hIcon = LoadImageA(0, IDI_WINLOGOA, IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR);
return hIcon; return hIcon;
} }
...@@ -3287,7 +3287,7 @@ DWORD WINAPI DragObject16( HWND16 hwndScope, HWND16 hWnd, UINT16 wObj, ...@@ -3287,7 +3287,7 @@ DWORD WINAPI DragObject16( HWND16 hwndScope, HWND16 hWnd, UINT16 wObj,
return 0L; return 0L;
} }
hBummer = LoadCursorA(0, IDC_BUMMERA); hBummer = LoadCursorA(0, MAKEINTRESOURCEA(OCR_NO));
if( !hBummer || !wndPtr ) if( !hBummer || !wndPtr )
{ {
......
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