From cf52644a1c6ab119a89ff461215d9155c3a422f1 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 10 Sep 2003 03:56:47 +0000 Subject: [PATCH] Removed the A/W constants for builtin cursors, icons and resource types since they don't exist on Windows, and added typecasts everywhere instead. --- controls/button.c | 2 +- controls/combo.c | 2 +- controls/desktop.c | 2 +- controls/edit.c | 2 +- controls/icontitle.c | 2 +- controls/listbox.c | 4 +- controls/menu.c | 8 +- controls/scroll.c | 2 +- controls/static.c | 2 +- dlls/comctl32/animate.c | 2 +- dlls/comctl32/comboex.c | 2 +- dlls/comctl32/commctrl.c | 2 +- dlls/comctl32/datetime.c | 2 +- dlls/comctl32/flatsb.c | 2 +- dlls/comctl32/header.c | 4 +- dlls/comctl32/ipaddress.c | 2 +- dlls/comctl32/listview.c | 2 +- dlls/comctl32/monthcal.c | 2 +- dlls/comctl32/nativefont.c | 2 +- dlls/comctl32/pager.c | 2 +- dlls/comctl32/progress.c | 2 +- dlls/comctl32/propsheet.c | 12 +- dlls/comctl32/rebar.c | 8 +- dlls/comctl32/status.c | 2 +- dlls/comctl32/tab.c | 4 +- dlls/comctl32/toolbar.c | 4 +- dlls/comctl32/tooltips.c | 2 +- dlls/comctl32/trackbar.c | 2 +- dlls/comctl32/treeview.c | 2 +- dlls/comctl32/updown.c | 2 +- dlls/commdlg/colordlg.c | 6 +- dlls/commdlg/colordlg16.c | 4 +- dlls/commdlg/filedlg.c | 12 +- dlls/commdlg/filedlg95.c | 6 +- dlls/commdlg/finddlg.c | 4 +- dlls/commdlg/finddlg32.c | 6 +- dlls/commdlg/fontdlg.c | 10 +- dlls/commdlg/fontdlg16.c | 4 +- dlls/commdlg/printdlg.c | 24 +-- dlls/commdlg/printdlg16.c | 6 +- dlls/ddraw/dsurface/wndproc.c | 2 +- dlls/kernel/format_msg.c | 2 +- dlls/kernel/locale.c | 12 +- dlls/kernel/resource16.c | 8 +- dlls/msvcrt/locale.c | 2 +- dlls/richedit/richedit.c | 2 +- dlls/setupapi/virtcopy.c | 4 +- dlls/shell32/brsfolder.c | 4 +- dlls/shell32/dialogs.c | 5 +- dlls/shell32/shell32_main.c | 8 +- dlls/shell32/shlview.c | 2 +- dlls/shell32/systray.c | 2 +- dlls/shlwapi/ordinal.c | 4 +- dlls/user/controls.h | 14 +- dlls/user/dialog16.c | 4 +- dlls/user/exticon.c | 4 +- dlls/user/resource.c | 8 +- dlls/user/tests/sysparams.c | 11 +- dlls/user/tests/win.c | 8 +- dlls/winmm/mci.c | 4 +- dlls/winmm/mciavi/wnd.c | 3 +- dlls/winmm/mmsystem.c | 2 +- dlls/x11drv/desktop.c | 2 +- include/wine/winuser16.h | 17 -- include/winuser.h | 174 ++++++--------------- programs/winemenubuilder/winemenubuilder.c | 8 +- programs/winhelp/winhelp.c | 4 +- windows/class.c | 2 +- windows/cursoricon.c | 12 +- windows/defwnd.c | 2 +- windows/dialog.c | 10 +- windows/mdi.c | 4 +- windows/msgbox.c | 10 +- windows/nonclient.c | 12 +- 74 files changed, 219 insertions(+), 325 deletions(-) diff --git a/controls/button.c b/controls/button.c index 1368599dde4..2ffa0b9a4ba 100644 --- a/controls/button.c +++ b/controls/button.c @@ -108,7 +108,7 @@ const struct builtin_class_descr BUTTON_builtin_class = ButtonWndProcA, /* procA */ ButtonWndProcW, /* procW */ NB_EXTRA_BYTES, /* extra */ - IDC_ARROWA, /* cursor */ + IDC_ARROW, /* cursor */ 0 /* brush */ }; diff --git a/controls/combo.c b/controls/combo.c index 6b2d6a43d81..3a2d0004bf0 100644 --- a/controls/combo.c +++ b/controls/combo.c @@ -85,7 +85,7 @@ const struct builtin_class_descr COMBO_builtin_class = ComboWndProcA, /* procA */ ComboWndProcW, /* procW */ sizeof(HEADCOMBO *), /* extra */ - IDC_ARROWA, /* cursor */ + IDC_ARROW, /* cursor */ 0 /* brush */ }; diff --git a/controls/desktop.c b/controls/desktop.c index 8ee0accd3e5..10fc475241c 100644 --- a/controls/desktop.c +++ b/controls/desktop.c @@ -52,7 +52,7 @@ const struct builtin_class_descr DESKTOP_builtin_class = NULL, /* procA (winproc is Unicode only) */ DesktopWndProc, /* procW */ 0, /* extra */ - IDC_ARROWA, /* cursor */ + IDC_ARROW, /* cursor */ (HBRUSH)(COLOR_BACKGROUND+1) /* brush */ }; diff --git a/controls/edit.c b/controls/edit.c index c6e991a3255..d67ab35b31a 100644 --- a/controls/edit.c +++ b/controls/edit.c @@ -289,7 +289,7 @@ const struct builtin_class_descr EDIT_builtin_class = EditWndProcA, /* procA */ EditWndProcW, /* procW */ sizeof(EDITSTATE *), /* extra */ - IDC_IBEAMA, /* cursor */ + IDC_IBEAM, /* cursor */ 0 /* brush */ }; diff --git a/controls/icontitle.c b/controls/icontitle.c index 53bd8f85468..44173cd71db 100644 --- a/controls/icontitle.c +++ b/controls/icontitle.c @@ -51,7 +51,7 @@ const struct builtin_class_descr ICONTITLE_builtin_class = NULL, /* procA (winproc is Unicode only) */ IconTitleWndProc, /* procW */ 0, /* extra */ - IDC_ARROWA, /* cursor */ + IDC_ARROW, /* cursor */ 0 /* brush */ }; diff --git a/controls/listbox.c b/controls/listbox.c index 0bbaa7616af..b6ddb38a08f 100644 --- a/controls/listbox.c +++ b/controls/listbox.c @@ -143,7 +143,7 @@ const struct builtin_class_descr LISTBOX_builtin_class = ListBoxWndProcA, /* procA */ ListBoxWndProcW, /* procW */ sizeof(LB_DESCR *), /* extra */ - IDC_ARROWA, /* cursor */ + IDC_ARROW, /* cursor */ 0 /* brush */ }; @@ -158,7 +158,7 @@ const struct builtin_class_descr COMBOLBOX_builtin_class = ComboLBWndProcA, /* procA */ ComboLBWndProcW, /* procW */ sizeof(LB_DESCR *), /* extra */ - IDC_ARROWA, /* cursor */ + IDC_ARROW, /* cursor */ 0 /* brush */ }; diff --git a/controls/menu.c b/controls/menu.c index 16af97af63b..fa663cd94b5 100644 --- a/controls/menu.c +++ b/controls/menu.c @@ -191,7 +191,7 @@ const struct builtin_class_descr MENU_builtin_class = NULL, /* procA (winproc is Unicode only) */ PopupMenuWndProc, /* procW */ sizeof(HMENU), /* extra */ - IDC_ARROWA, /* cursor */ + IDC_ARROW, /* cursor */ (HBRUSH)(COLOR_MENU+1) /* brush */ }; @@ -3937,7 +3937,7 @@ HMENU16 WINAPI LoadMenu16( HINSTANCE16 instance, LPCSTR name ) if (!name) return 0; instance = GetExePtr( instance ); - if (!(hRsrc = FindResource16( instance, name, RT_MENUA ))) return 0; + if (!(hRsrc = FindResource16( instance, name, (LPSTR)RT_MENU ))) return 0; if (!(handle = LoadResource16( instance, hRsrc ))) return 0; hMenu = LoadMenuIndirect16(LockResource16(handle)); FreeResource16( handle ); @@ -3950,7 +3950,7 @@ HMENU16 WINAPI LoadMenu16( HINSTANCE16 instance, LPCSTR name ) */ HMENU WINAPI LoadMenuA( HINSTANCE instance, LPCSTR name ) { - HRSRC hrsrc = FindResourceA( instance, name, RT_MENUA ); + HRSRC hrsrc = FindResourceA( instance, name, (LPSTR)RT_MENU ); if (!hrsrc) return 0; return LoadMenuIndirectA( (LPCVOID)LoadResource( instance, hrsrc )); } @@ -3961,7 +3961,7 @@ HMENU WINAPI LoadMenuA( HINSTANCE instance, LPCSTR name ) */ HMENU WINAPI LoadMenuW( HINSTANCE instance, LPCWSTR name ) { - HRSRC hrsrc = FindResourceW( instance, name, RT_MENUW ); + HRSRC hrsrc = FindResourceW( instance, name, (LPWSTR)RT_MENU ); if (!hrsrc) return 0; return LoadMenuIndirectW( (LPCVOID)LoadResource( instance, hrsrc )); } diff --git a/controls/scroll.c b/controls/scroll.c index fc10e28448e..ac1553cf972 100644 --- a/controls/scroll.c +++ b/controls/scroll.c @@ -136,7 +136,7 @@ const struct builtin_class_descr SCROLL_builtin_class = NULL, /* procA (winproc is Unicode only) */ ScrollBarWndProc, /* procW */ sizeof(SCROLLBAR_INFO), /* extra */ - IDC_ARROWA, /* cursor */ + IDC_ARROW, /* cursor */ 0 /* brush */ }; diff --git a/controls/static.c b/controls/static.c index 43216e8b712..c020d4c339b 100644 --- a/controls/static.c +++ b/controls/static.c @@ -84,7 +84,7 @@ const struct builtin_class_descr STATIC_builtin_class = StaticWndProcA, /* procA */ StaticWndProcW, /* procW */ STATIC_EXTRA_BYTES, /* extra */ - IDC_ARROWA, /* cursor */ + IDC_ARROW, /* cursor */ 0 /* brush */ }; diff --git a/dlls/comctl32/animate.c b/dlls/comctl32/animate.c index 94c1ca4c733..ba9738c4d26 100644 --- a/dlls/comctl32/animate.c +++ b/dlls/comctl32/animate.c @@ -947,7 +947,7 @@ void ANIMATE_Register(void) wndClass.lpfnWndProc = (WNDPROC)ANIMATE_WindowProc; wndClass.cbClsExtra = 0; wndClass.cbWndExtra = sizeof(ANIMATE_INFO *); - wndClass.hCursor = LoadCursorA(0, IDC_ARROWA); + wndClass.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); wndClass.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); wndClass.lpszClassName = ANIMATE_CLASSA; diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c index c0099e85aa0..6010127103e 100644 --- a/dlls/comctl32/comboex.c +++ b/dlls/comctl32/comboex.c @@ -2280,7 +2280,7 @@ void COMBOEX_Register (void) wndClass.lpfnWndProc = (WNDPROC)COMBOEX_WindowProc; wndClass.cbClsExtra = 0; wndClass.cbWndExtra = sizeof(COMBOEX_INFO *); - wndClass.hCursor = LoadCursorW (0, IDC_ARROWW); + wndClass.hCursor = LoadCursorW (0, (LPWSTR)IDC_ARROW); wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); wndClass.lpszClassName = WC_COMBOBOXEXW; diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index 5f1beadf358..cf1f9613632 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c @@ -847,7 +847,7 @@ CreateMappedBitmap (HINSTANCE hInstance, INT idBitmap, UINT wFlags, sysColorMap = (LPCOLORMAP)internalColorMap; } - hRsrc = FindResourceA (hInstance, (LPSTR)idBitmap, RT_BITMAPA); + hRsrc = FindResourceA (hInstance, (LPSTR)idBitmap, (LPSTR)RT_BITMAP); if (hRsrc == 0) return 0; hglb = LoadResource (hInstance, hRsrc); diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c index 9f32f59080c..d923674dba7 100644 --- a/dlls/comctl32/datetime.c +++ b/dlls/comctl32/datetime.c @@ -1356,7 +1356,7 @@ DATETIME_Register (void) wndClass.lpfnWndProc = (WNDPROC)DATETIME_WindowProc; wndClass.cbClsExtra = 0; wndClass.cbWndExtra = sizeof(DATETIME_INFO *); - wndClass.hCursor = LoadCursorA (0, IDC_ARROWA); + wndClass.hCursor = LoadCursorA (0, (LPSTR)IDC_ARROW); wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); wndClass.lpszClassName = DATETIMEPICK_CLASSA; diff --git a/dlls/comctl32/flatsb.c b/dlls/comctl32/flatsb.c index 0a1ecb53bd9..c5881535801 100644 --- a/dlls/comctl32/flatsb.c +++ b/dlls/comctl32/flatsb.c @@ -245,7 +245,7 @@ FLATSB_Register (void) wndClass.lpfnWndProc = (WNDPROC)FlatSB_WindowProc; wndClass.cbClsExtra = 0; wndClass.cbWndExtra = sizeof(FLATSB_INFO *); - wndClass.hCursor = LoadCursorA (0, IDC_ARROWA); + wndClass.hCursor = LoadCursorA (0, (LPSTR)IDC_ARROW); wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); wndClass.lpszClassName = FLATSB_CLASSA; diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c index 0d47f130a9e..d94f7428690 100644 --- a/dlls/comctl32/header.c +++ b/dlls/comctl32/header.c @@ -1252,7 +1252,7 @@ HEADER_Create (HWND hwnd, WPARAM wParam, LPARAM lParam) infoPtr->hFont = 0; infoPtr->items = 0; infoPtr->bRectsValid = FALSE; - infoPtr->hcurArrow = LoadCursorA (0, IDC_ARROWA); + infoPtr->hcurArrow = LoadCursorA (0, (LPSTR)IDC_ARROW); infoPtr->hcurDivider = LoadCursorA (COMCTL32_hModule, MAKEINTRESOURCEA(IDC_DIVIDER)); infoPtr->hcurDivopen = LoadCursorA (COMCTL32_hModule, MAKEINTRESOURCEA(IDC_DIVIDEROPEN)); infoPtr->bPressed = FALSE; @@ -1799,7 +1799,7 @@ HEADER_Register (void) wndClass.lpfnWndProc = (WNDPROC)HEADER_WindowProc; wndClass.cbClsExtra = 0; wndClass.cbWndExtra = sizeof(HEADER_INFO *); - wndClass.hCursor = LoadCursorA (0, IDC_ARROWA); + wndClass.hCursor = LoadCursorA (0, (LPSTR)IDC_ARROW); wndClass.lpszClassName = WC_HEADERA; RegisterClassA (&wndClass); diff --git a/dlls/comctl32/ipaddress.c b/dlls/comctl32/ipaddress.c index 289ab47f1d5..03067d038b6 100644 --- a/dlls/comctl32/ipaddress.c +++ b/dlls/comctl32/ipaddress.c @@ -564,7 +564,7 @@ void IPADDRESS_Register (void) wndClass.lpfnWndProc = (WNDPROC)IPADDRESS_WindowProc; wndClass.cbClsExtra = 0; wndClass.cbWndExtra = sizeof(IPADDRESS_INFO *); - wndClass.hCursor = LoadCursorW (0, IDC_IBEAMW); + wndClass.hCursor = LoadCursorW (0, (LPWSTR)IDC_IBEAM); wndClass.hbrBackground = GetStockObject(WHITE_BRUSH); wndClass.lpszClassName = WC_IPADDRESSW; diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index df975fd0b29..67d26243b29 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -8949,7 +8949,7 @@ void LISTVIEW_Register(void) wndClass.lpfnWndProc = (WNDPROC)LISTVIEW_WindowProc; wndClass.cbClsExtra = 0; wndClass.cbWndExtra = sizeof(LISTVIEW_INFO *); - wndClass.hCursor = LoadCursorW(0, IDC_ARROWW); + wndClass.hCursor = LoadCursorW(0, (LPWSTR)IDC_ARROW); wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); wndClass.lpszClassName = WC_LISTVIEWW; RegisterClassW(&wndClass); diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c index 9d05f02cbb2..d30988fa3dc 100644 --- a/dlls/comctl32/monthcal.c +++ b/dlls/comctl32/monthcal.c @@ -2054,7 +2054,7 @@ MONTHCAL_Register(void) wndClass.lpfnWndProc = (WNDPROC)MONTHCAL_WindowProc; wndClass.cbClsExtra = 0; wndClass.cbWndExtra = sizeof(MONTHCAL_INFO *); - wndClass.hCursor = LoadCursorA(0, IDC_ARROWA); + wndClass.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); wndClass.lpszClassName = MONTHCAL_CLASSA; diff --git a/dlls/comctl32/nativefont.c b/dlls/comctl32/nativefont.c index aba05277875..762233f9747 100644 --- a/dlls/comctl32/nativefont.c +++ b/dlls/comctl32/nativefont.c @@ -125,7 +125,7 @@ NATIVEFONT_Register (void) wndClass.lpfnWndProc = (WNDPROC)NATIVEFONT_WindowProc; wndClass.cbClsExtra = 0; wndClass.cbWndExtra = sizeof(NATIVEFONT_INFO *); - wndClass.hCursor = LoadCursorA (0, IDC_ARROWA); + wndClass.hCursor = LoadCursorA (0, (LPSTR)IDC_ARROW); wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); wndClass.lpszClassName = WC_NATIVEFONTCTLA; diff --git a/dlls/comctl32/pager.c b/dlls/comctl32/pager.c index 74173499136..04a76d1e4d7 100644 --- a/dlls/comctl32/pager.c +++ b/dlls/comctl32/pager.c @@ -1594,7 +1594,7 @@ PAGER_Register (void) wndClass.lpfnWndProc = (WNDPROC)PAGER_WindowProc; wndClass.cbClsExtra = 0; wndClass.cbWndExtra = sizeof(PAGER_INFO *); - wndClass.hCursor = LoadCursorA (0, IDC_ARROWA); + wndClass.hCursor = LoadCursorA (0, (LPSTR)IDC_ARROW); wndClass.hbrBackground = 0; wndClass.lpszClassName = WC_PAGESCROLLERA; diff --git a/dlls/comctl32/progress.c b/dlls/comctl32/progress.c index 0a10b92926d..526999ca5f2 100644 --- a/dlls/comctl32/progress.c +++ b/dlls/comctl32/progress.c @@ -422,7 +422,7 @@ VOID PROGRESS_Register (void) wndClass.lpfnWndProc = (WNDPROC)ProgressWindowProc; wndClass.cbClsExtra = 0; wndClass.cbWndExtra = sizeof (PROGRESS_INFO *); - wndClass.hCursor = LoadCursorW (0, IDC_ARROWW); + wndClass.hCursor = LoadCursorW (0, (LPWSTR)IDC_ARROW); wndClass.lpszClassName = PROGRESS_CLASSW; RegisterClassW (&wndClass); diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index 4da54f98459..870a40fc8e2 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c @@ -423,7 +423,7 @@ BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp, { HRSRC hResource = FindResourceW(lppsp->hInstance, lppsp->u.pszTemplate, - RT_DIALOGW); + (LPWSTR)RT_DIALOG); HGLOBAL hTemplate = LoadResource(lppsp->hInstance, hResource); pTemplate = (LPDLGTEMPLATEW)LockResource(hTemplate); @@ -432,7 +432,7 @@ BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp, { HRSRC hResource = FindResourceA(lppsp->hInstance, (LPSTR)lppsp->u.pszTemplate, - RT_DIALOGA); + (LPSTR)RT_DIALOG); HGLOBAL hTemplate = LoadResource(lppsp->hInstance, hResource); pTemplate = (LPDLGTEMPLATEA)LockResource(hTemplate); @@ -585,14 +585,14 @@ int PROPSHEET_CreateDialog(PropSheetInfo* psInfo) { if(!(hRes = FindResourceW(COMCTL32_hModule, MAKEINTRESOURCEW(resID), - RT_DIALOGW))) + (LPWSTR)RT_DIALOG))) return -1; } else { if(!(hRes = FindResourceA(COMCTL32_hModule, MAKEINTRESOURCEA(resID), - RT_DIALOGA))) + (LPSTR)RT_DIALOG))) return -1; } @@ -1396,7 +1396,7 @@ static BOOL PROPSHEET_CreatePage(HWND hwndParent, hResource = FindResourceW(ppshpage->hInstance, ppshpage->u.pszTemplate, - RT_DIALOGW); + (LPWSTR)RT_DIALOG); if(!hResource) return FALSE; @@ -1418,7 +1418,7 @@ static BOOL PROPSHEET_CreatePage(HWND hwndParent, hResource = FindResourceA(ppshpage->hInstance, (LPSTR)ppshpage->u.pszTemplate, - RT_DIALOGA); + (LPSTR)RT_DIALOG); if(!hResource) return FALSE; diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c index eedd289bc01..8ba05939871 100644 --- a/dlls/comctl32/rebar.c +++ b/dlls/comctl32/rebar.c @@ -3871,10 +3871,10 @@ REBAR_NCCreate (HWND hwnd, WPARAM wParam, LPARAM lParam) infoPtr->ihitBand = -1; infoPtr->hwndSelf = hwnd; infoPtr->DoRedraw = TRUE; - infoPtr->hcurArrow = LoadCursorA (0, IDC_ARROWA); - infoPtr->hcurHorz = LoadCursorA (0, IDC_SIZEWEA); - infoPtr->hcurVert = LoadCursorA (0, IDC_SIZENSA); - infoPtr->hcurDrag = LoadCursorA (0, IDC_SIZEA); + infoPtr->hcurArrow = LoadCursorA (0, (LPSTR)IDC_ARROW); + infoPtr->hcurHorz = LoadCursorA (0, (LPSTR)IDC_SIZEWE); + infoPtr->hcurVert = LoadCursorA (0, (LPSTR)IDC_SIZENS); + infoPtr->hcurDrag = LoadCursorA (0, (LPSTR)IDC_SIZE); infoPtr->bUnicode = IsWindowUnicode (hwnd); infoPtr->fStatus = CREATE_RUNNING; infoPtr->hFont = GetStockObject (SYSTEM_FONT); diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c index ad376ce8311..fac07ac469d 100644 --- a/dlls/comctl32/status.c +++ b/dlls/comctl32/status.c @@ -1270,7 +1270,7 @@ STATUS_Register (void) wndClass.lpfnWndProc = (WNDPROC)StatusWindowProc; wndClass.cbClsExtra = 0; wndClass.cbWndExtra = sizeof(STATUSWINDOWINFO *); - wndClass.hCursor = LoadCursorW (0, IDC_ARROWW); + wndClass.hCursor = LoadCursorW (0, (LPWSTR)IDC_ARROW); wndClass.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1); wndClass.lpszClassName = STATUSCLASSNAMEW; diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c index 3f493c69ccf..b62368fb8d0 100644 --- a/dlls/comctl32/tab.c +++ b/dlls/comctl32/tab.c @@ -2957,7 +2957,7 @@ TAB_Create (HWND hwnd, WPARAM wParam, LPARAM lParam) infoPtr->uVItemPadding = 3; infoPtr->hFont = 0; infoPtr->items = 0; - infoPtr->hcurArrow = LoadCursorA (0, IDC_ARROWA); + infoPtr->hcurArrow = LoadCursorA (0, (LPSTR)IDC_ARROW); infoPtr->iSelected = -1; infoPtr->iHotTracked = -1; infoPtr->uFocus = -1; @@ -3256,7 +3256,7 @@ TAB_Register (void) wndClass.lpfnWndProc = (WNDPROC)TAB_WindowProc; wndClass.cbClsExtra = 0; wndClass.cbWndExtra = sizeof(TAB_INFO *); - wndClass.hCursor = LoadCursorA (0, IDC_ARROWA); + wndClass.hCursor = LoadCursorA (0, (LPSTR)IDC_ARROW); wndClass.hbrBackground = NULL; wndClass.lpszClassName = WC_TABCONTROLA; diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 4ce40752467..ce365d5b414 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -2867,7 +2867,7 @@ TOOLBAR_Customize (HWND hwnd) if (!(hRes = FindResourceA (COMCTL32_hModule, MAKEINTRESOURCEA(IDD_TBCUSTOMIZE), - RT_DIALOGA))) + (LPSTR)RT_DIALOG))) return FALSE; if(!(template = (LPVOID)LoadResource (COMCTL32_hModule, hRes))) @@ -6006,7 +6006,7 @@ TOOLBAR_Register (void) wndClass.lpfnWndProc = (WNDPROC)ToolbarWindowProc; wndClass.cbClsExtra = 0; wndClass.cbWndExtra = sizeof(TOOLBAR_INFO *); - wndClass.hCursor = LoadCursorA (0, IDC_ARROWA); + wndClass.hCursor = LoadCursorA (0, (LPSTR)IDC_ARROW); wndClass.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1); wndClass.lpszClassName = TOOLBARCLASSNAMEA; diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c index 0f112d138cd..dfefe150e3f 100644 --- a/dlls/comctl32/tooltips.c +++ b/dlls/comctl32/tooltips.c @@ -2438,7 +2438,7 @@ TOOLTIPS_Register (void) wndClass.lpfnWndProc = (WNDPROC)TOOLTIPS_WindowProc; wndClass.cbClsExtra = 0; wndClass.cbWndExtra = sizeof(TOOLTIPS_INFO *); - wndClass.hCursor = LoadCursorA (0, IDC_ARROWA); + wndClass.hCursor = LoadCursorA (0, (LPSTR)IDC_ARROW); wndClass.hbrBackground = 0; wndClass.lpszClassName = TOOLTIPS_CLASSA; diff --git a/dlls/comctl32/trackbar.c b/dlls/comctl32/trackbar.c index c7db527bf7b..009b981b2ce 100644 --- a/dlls/comctl32/trackbar.c +++ b/dlls/comctl32/trackbar.c @@ -1784,7 +1784,7 @@ void TRACKBAR_Register (void) wndClass.lpfnWndProc = (WNDPROC)TRACKBAR_WindowProc; wndClass.cbClsExtra = 0; wndClass.cbWndExtra = sizeof(TRACKBAR_INFO *); - wndClass.hCursor = LoadCursorW (0, IDC_ARROWW); + wndClass.hCursor = LoadCursorW (0, (LPWSTR)IDC_ARROW); wndClass.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1); wndClass.lpszClassName = TRACKBAR_CLASSW; diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index c43f45c122e..0bff279ec51 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -5454,7 +5454,7 @@ TREEVIEW_Register(void) wndClass.cbClsExtra = 0; wndClass.cbWndExtra = sizeof(TREEVIEW_INFO *); - wndClass.hCursor = LoadCursorA(0, IDC_ARROWA); + wndClass.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); wndClass.hbrBackground = 0; wndClass.lpszClassName = WC_TREEVIEWA; diff --git a/dlls/comctl32/updown.c b/dlls/comctl32/updown.c index 6bb622d35dd..f626184c88c 100644 --- a/dlls/comctl32/updown.c +++ b/dlls/comctl32/updown.c @@ -952,7 +952,7 @@ void UPDOWN_Register(void) wndClass.lpfnWndProc = (WNDPROC)UpDownWindowProc; wndClass.cbClsExtra = 0; wndClass.cbWndExtra = sizeof(UPDOWN_INFO*); - wndClass.hCursor = LoadCursorW( 0, IDC_ARROWW ); + wndClass.hCursor = LoadCursorW( 0, (LPWSTR)IDC_ARROW ); wndClass.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1); wndClass.lpszClassName = UPDOWN_CLASSW; diff --git a/dlls/commdlg/colordlg.c b/dlls/commdlg/colordlg.c index f18b706539f..8ba7831ffe0 100644 --- a/dlls/commdlg/colordlg.c +++ b/dlls/commdlg/colordlg.c @@ -527,7 +527,7 @@ static void CC_PrepareColorGraph( HWND hDlg ) HBRUSH hbrush; HDC hdc ; RECT rect, client; - HCURSOR hcursor = SetCursor( LoadCursorA(0, IDC_WAITA) ); + HCURSOR hcursor = SetCursor( LoadCursorA(0, (LPSTR)IDC_WAIT) ); GetClientRect(hwnd, &client); hdc = GetDC(hwnd); @@ -1302,7 +1302,7 @@ BOOL WINAPI ChooseColorW( LPCHOOSECOLORW lpChCol ) HRSRC hResInfo; if (!(hResInfo = FindResourceW((HINSTANCE)lpChCol->hInstance, lpChCol->lpTemplateName, - RT_DIALOGW))) + (LPWSTR)RT_DIALOG))) { COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE); return FALSE; @@ -1318,7 +1318,7 @@ BOOL WINAPI ChooseColorW( LPCHOOSECOLORW lpChCol ) { HRSRC hResInfo; HGLOBAL hDlgTmpl; - if (!(hResInfo = FindResourceA(COMDLG32_hInstance, "CHOOSE_COLOR", RT_DIALOGA))) + if (!(hResInfo = FindResourceA(COMDLG32_hInstance, "CHOOSE_COLOR", (LPSTR)RT_DIALOG))) { COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE); return FALSE; diff --git a/dlls/commdlg/colordlg16.c b/dlls/commdlg/colordlg16.c index 08b864c5bb2..5ff7929cdd1 100644 --- a/dlls/commdlg/colordlg16.c +++ b/dlls/commdlg/colordlg16.c @@ -134,7 +134,7 @@ BOOL16 WINAPI ChooseColor16( LPCHOOSECOLOR16 lpChCol ) HANDLE16 hResInfo; if (!(hResInfo = FindResource16(lpChCol->hInstance, MapSL(lpChCol->lpTemplateName), - RT_DIALOGA))) + (LPSTR)RT_DIALOG))) { COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE); return FALSE; @@ -152,7 +152,7 @@ BOOL16 WINAPI ChooseColor16( LPCHOOSECOLOR16 lpChCol ) HGLOBAL hDlgTmpl32; LPCVOID template32; DWORD size; - if (!(hResInfo = FindResourceA(COMDLG32_hInstance, "CHOOSE_COLOR", RT_DIALOGA))) + if (!(hResInfo = FindResourceA(COMDLG32_hInstance, "CHOOSE_COLOR", (LPSTR)RT_DIALOG))) { COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE); return FALSE; diff --git a/dlls/commdlg/filedlg.c b/dlls/commdlg/filedlg.c index d3fc4bb614b..0e8338b5e45 100644 --- a/dlls/commdlg/filedlg.c +++ b/dlls/commdlg/filedlg.c @@ -123,11 +123,11 @@ BOOL Get32BitsTemplate(LFSPRIVATE lfs) if (lfs->ofnA) hResInfo = FindResourceA(lfs->ofnA->hInstance, lfs->ofnA->lpTemplateName, - RT_DIALOGA); + (LPSTR)RT_DIALOG); else hResInfo = FindResourceW(ofnW->hInstance, ofnW->lpTemplateName, - RT_DIALOGW); + (LPWSTR)RT_DIALOG); if (!hResInfo) { COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE); @@ -143,7 +143,7 @@ BOOL Get32BitsTemplate(LFSPRIVATE lfs) } else { /* get it from internal Wine resource */ HRSRC hResInfo; if (!(hResInfo = FindResourceA(COMDLG32_hInstance, - lfs->open? "OPEN_FILE":"SAVE_FILE", RT_DIALOGA))) + lfs->open? "OPEN_FILE":"SAVE_FILE", (LPSTR)RT_DIALOG))) { COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE); return FALSE; @@ -179,7 +179,7 @@ BOOL Get16BitsTemplate(LFSPRIVATE lfs) HANDLE16 hResInfo; if (!(hResInfo = FindResource16(ofn16->hInstance, MapSL(ofn16->lpTemplateName), - RT_DIALOGA))) + (LPSTR)RT_DIALOG))) { COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE); return FALSE; @@ -199,7 +199,7 @@ BOOL Get16BitsTemplate(LFSPRIVATE lfs) DWORD size; if (!(hResInfo = FindResourceA(COMDLG32_hInstance, - lfs->open ? "OPEN_FILE":"SAVE_FILE", RT_DIALOGA))) + lfs->open ? "OPEN_FILE":"SAVE_FILE", (LPSTR)RT_DIALOG))) { COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE); return FALSE; @@ -298,7 +298,7 @@ BOOL FILEDLG_ScanDir(HWND hWnd, LPWSTR newPath) /* get the list of spec files */ GetDlgItemTextW(hWnd, edt1, buffer, sizeof(buffer)/sizeof(WCHAR)); - hCursorWait = LoadCursorA(0, IDC_WAITA); + hCursorWait = LoadCursorA(0, (LPSTR)IDC_WAIT); oldCursor = SetCursor(hCursorWait); /* list of files */ diff --git a/dlls/commdlg/filedlg95.c b/dlls/commdlg/filedlg95.c index e8dd865b770..cb2d676d27f 100644 --- a/dlls/commdlg/filedlg95.c +++ b/dlls/commdlg/filedlg95.c @@ -253,7 +253,7 @@ BOOL WINAPI GetFileName95(FileOpenDlgInfos *fodInfos) /* Create the dialog from a template */ - if(!(hRes = FindResourceA(COMDLG32_hInstance,MAKEINTRESOURCEA(NEWFILEOPENORD),RT_DIALOGA))) + if(!(hRes = FindResourceA(COMDLG32_hInstance,MAKEINTRESOURCEA(NEWFILEOPENORD),(LPSTR)RT_DIALOG))) { COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE); return FALSE; @@ -732,12 +732,12 @@ HWND CreateTemplateDialog(FileOpenDlgInfos *fodInfos, HWND hwnd) if(fodInfos->unicode) { LPOPENFILENAMEW ofn = (LPOPENFILENAMEW) fodInfos->ofnInfos; - hRes = FindResourceW( hinst, ofn->lpTemplateName, RT_DIALOGW); + hRes = FindResourceW( hinst, ofn->lpTemplateName, (LPWSTR)RT_DIALOG); } else { LPOPENFILENAMEA ofn = fodInfos->ofnInfos; - hRes = FindResourceA( hinst, ofn->lpTemplateName, RT_DIALOGA); + hRes = FindResourceA( hinst, ofn->lpTemplateName, (LPSTR)RT_DIALOG); } if (!hRes) { diff --git a/dlls/commdlg/finddlg.c b/dlls/commdlg/finddlg.c index 111c7ed8acf..44e0ee375a3 100644 --- a/dlls/commdlg/finddlg.c +++ b/dlls/commdlg/finddlg.c @@ -79,7 +79,7 @@ BOOL FINDDLG_Get16BitsTemplate(LFRPRIVATE lfr) HANDLE16 hResInfo; if (!(hResInfo = FindResource16(fr16->hInstance, MapSL(fr16->lpTemplateName), - RT_DIALOGA))) + (LPSTR)RT_DIALOG))) { COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE); return FALSE; @@ -109,7 +109,7 @@ BOOL FINDDLG_Get16BitsTemplate(LFRPRIVATE lfr) if (!(hResInfo = FindResourceA(COMDLG32_hInstance, lfr->find ? MAKEINTRESOURCEA(FINDDLGORD):MAKEINTRESOURCEA(REPLACEDLGORD), - RT_DIALOGA))) + (LPSTR)RT_DIALOG))) { COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE); return FALSE; diff --git a/dlls/commdlg/finddlg32.c b/dlls/commdlg/finddlg32.c index b772273e8f9..a75de117774 100644 --- a/dlls/commdlg/finddlg32.c +++ b/dlls/commdlg/finddlg32.c @@ -385,18 +385,18 @@ static HWND COMDLG32_FR_DoFindReplace( hmod = (HMODULE)pdata->fr.hInstance; if(pdata->fr.Flags & FR_WINE_UNICODE) { - htemplate = FindResourceW(hmod, (LPWSTR)pdata->fr.lpTemplateName, (LPWSTR)RT_DIALOGA); + htemplate = FindResourceW(hmod, (LPWSTR)pdata->fr.lpTemplateName, (LPWSTR)RT_DIALOG); } else { - htemplate = FindResourceA(hmod, pdata->fr.lpTemplateName, (LPCSTR)RT_DIALOGA); + htemplate = FindResourceA(hmod, pdata->fr.lpTemplateName, (LPCSTR)RT_DIALOG); } } else { int rcid = pdata->fr.Flags & FR_WINE_REPLACE ? REPLACEDLGORD : FINDDLGORD; - htemplate = FindResourceA(hmod, MAKEINTRESOURCEA(rcid), (LPCSTR)RT_DIALOGA); + htemplate = FindResourceA(hmod, MAKEINTRESOURCEA(rcid), (LPCSTR)RT_DIALOG); } if(!htemplate) { diff --git a/dlls/commdlg/fontdlg.c b/dlls/commdlg/fontdlg.c index 074669ad310..589b4cc1df5 100644 --- a/dlls/commdlg/fontdlg.c +++ b/dlls/commdlg/fontdlg.c @@ -170,7 +170,7 @@ BOOL WINAPI ChooseFontA(LPCHOOSEFONTA lpChFont) { hDlginst=lpChFont->hInstance; if( !(hResInfo = FindResourceA(hDlginst, lpChFont->lpTemplateName, - RT_DIALOGA))) + (LPSTR)RT_DIALOG))) { COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE); return FALSE; @@ -178,7 +178,7 @@ BOOL WINAPI ChooseFontA(LPCHOOSEFONTA lpChFont) } else { hDlginst=COMDLG32_hInstance; - if (!(hResInfo = FindResourceA(hDlginst, "CHOOSE_FONT", RT_DIALOGA))) + if (!(hResInfo = FindResourceA(hDlginst, "CHOOSE_FONT", (LPSTR)RT_DIALOG))) { COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE); return FALSE; @@ -326,7 +326,7 @@ BOOL WINAPI ChooseFontW(LPCHOOSEFONTW lpChFont) if (TRACE_ON(commdlg)) _dump_cf_flags(lpChFont->Flags); - if (!(hResInfo = FindResourceA(COMDLG32_hInstance, "CHOOSE_FONT", RT_DIALOGA))) + if (!(hResInfo = FindResourceA(COMDLG32_hInstance, "CHOOSE_FONT", (LPSTR)RT_DIALOG))) { COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE); return FALSE; @@ -568,7 +568,7 @@ LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam, int i,j,init=0; long l; LPLOGFONTA lpxx; - HCURSOR hcursor=SetCursor(LoadCursorA(0,IDC_WAITA)); + HCURSOR hcursor=SetCursor(LoadCursorA(0,(LPSTR)IDC_WAIT)); SetWindowLongA(hDlg, DWL_USER, lParam); lpxx=lpcf->lpLogFont; @@ -840,7 +840,7 @@ LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam, i=SendDlgItemMessageA(hDlg, cmb1, CB_GETCURSEL16, 0, 0); if (i!=CB_ERR) { - HCURSOR hcursor=SetCursor(LoadCursorA(0,IDC_WAITA)); + HCURSOR hcursor=SetCursor(LoadCursorA(0,(LPSTR)IDC_WAIT)); CFn_ENUMSTRUCT s; char str[256]; SendDlgItemMessageA(hDlg, cmb1, CB_GETLBTEXT, i, diff --git a/dlls/commdlg/fontdlg16.c b/dlls/commdlg/fontdlg16.c index 66c446451d0..9e68607f672 100644 --- a/dlls/commdlg/fontdlg16.c +++ b/dlls/commdlg/fontdlg16.c @@ -162,7 +162,7 @@ BOOL16 WINAPI ChooseFont16(LPCHOOSEFONT16 lpChFont) HANDLE16 hResInfo; if (!(hResInfo = FindResource16( lpChFont->hInstance, MapSL(lpChFont->lpTemplateName), - RT_DIALOGA))) + (LPSTR)RT_DIALOG))) { COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE); return FALSE; @@ -180,7 +180,7 @@ BOOL16 WINAPI ChooseFont16(LPCHOOSEFONT16 lpChFont) HGLOBAL hDlgTmpl32; LPCVOID template32; DWORD size; - if (!(hResInfo = FindResourceA(COMDLG32_hInstance, "CHOOSE_FONT", RT_DIALOGA))) + if (!(hResInfo = FindResourceA(COMDLG32_hInstance, "CHOOSE_FONT", (LPSTR)RT_DIALOG))) { COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE); return FALSE; diff --git a/dlls/commdlg/printdlg.c b/dlls/commdlg/printdlg.c index 8467349b2b8..3a6c98a99f2 100644 --- a/dlls/commdlg/printdlg.c +++ b/dlls/commdlg/printdlg.c @@ -1879,11 +1879,11 @@ static HGLOBAL PRINTDLG_GetDlgTemplateA(PRINTDLGA *lppd) hDlgTmpl = lppd->hSetupTemplate; } else if(lppd->Flags & PD_ENABLESETUPTEMPLATE) { hResInfo = FindResourceA(lppd->hInstance, - lppd->lpSetupTemplateName, RT_DIALOGA); + lppd->lpSetupTemplateName, (LPSTR)RT_DIALOG); hDlgTmpl = LoadResource(lppd->hInstance, hResInfo); } else { hResInfo = FindResourceA(COMDLG32_hInstance, "PRINT32_SETUP", - RT_DIALOGA); + (LPSTR)RT_DIALOG); hDlgTmpl = LoadResource(COMDLG32_hInstance, hResInfo); } } else { @@ -1892,11 +1892,11 @@ static HGLOBAL PRINTDLG_GetDlgTemplateA(PRINTDLGA *lppd) } else if(lppd->Flags & PD_ENABLEPRINTTEMPLATE) { hResInfo = FindResourceA(lppd->hInstance, lppd->lpPrintTemplateName, - RT_DIALOGA); + (LPSTR)RT_DIALOG); hDlgTmpl = LoadResource(lppd->hInstance, hResInfo); } else { hResInfo = FindResourceA(COMDLG32_hInstance, "PRINT32", - RT_DIALOGA); + (LPSTR)RT_DIALOG); hDlgTmpl = LoadResource(COMDLG32_hInstance, hResInfo); } } @@ -1915,10 +1915,10 @@ static HGLOBAL PRINTDLG_GetDlgTemplateW(PRINTDLGW *lppd) hDlgTmpl = lppd->hSetupTemplate; } else if(lppd->Flags & PD_ENABLESETUPTEMPLATE) { hResInfo = FindResourceW(lppd->hInstance, - lppd->lpSetupTemplateName, RT_DIALOGW); + lppd->lpSetupTemplateName, (LPWSTR)RT_DIALOG); hDlgTmpl = LoadResource(lppd->hInstance, hResInfo); } else { - hResInfo = FindResourceW(COMDLG32_hInstance, xpsetup, RT_DIALOGW); + hResInfo = FindResourceW(COMDLG32_hInstance, xpsetup, (LPWSTR)RT_DIALOG); hDlgTmpl = LoadResource(COMDLG32_hInstance, hResInfo); } } else { @@ -1927,10 +1927,10 @@ static HGLOBAL PRINTDLG_GetDlgTemplateW(PRINTDLGW *lppd) } else if(lppd->Flags & PD_ENABLEPRINTTEMPLATE) { hResInfo = FindResourceW(lppd->hInstance, lppd->lpPrintTemplateName, - RT_DIALOGW); + (LPWSTR)RT_DIALOG); hDlgTmpl = LoadResource(lppd->hInstance, hResInfo); } else { - hResInfo = FindResourceW(COMDLG32_hInstance, xprint, RT_DIALOGW); + hResInfo = FindResourceW(COMDLG32_hInstance, xprint, (LPWSTR)RT_DIALOG); hDlgTmpl = LoadResource(COMDLG32_hInstance, hResInfo); } } @@ -2347,10 +2347,10 @@ static HGLOBAL PRINTDLG_GetPGSTemplateA(PAGESETUPDLGA *lppd) hDlgTmpl = lppd->hPageSetupTemplate; } else if(lppd->Flags & PSD_ENABLEPAGESETUPTEMPLATE) { hResInfo = FindResourceA(lppd->hInstance, - lppd->lpPageSetupTemplateName, RT_DIALOGA); + lppd->lpPageSetupTemplateName, (LPSTR)RT_DIALOG); hDlgTmpl = LoadResource(lppd->hInstance, hResInfo); } else { - hResInfo = FindResourceA(COMDLG32_hInstance,(LPCSTR)PAGESETUPDLGORD,RT_DIALOGA); + hResInfo = FindResourceA(COMDLG32_hInstance,(LPCSTR)PAGESETUPDLGORD,(LPSTR)RT_DIALOG); hDlgTmpl = LoadResource(COMDLG32_hInstance,hResInfo); } return hDlgTmpl; @@ -2365,10 +2365,10 @@ static HGLOBAL PRINTDLG_GetPGSTemplateW(PAGESETUPDLGW *lppd) hDlgTmpl = lppd->hPageSetupTemplate; } else if(lppd->Flags & PSD_ENABLEPAGESETUPTEMPLATE) { hResInfo = FindResourceW(lppd->hInstance, - lppd->lpPageSetupTemplateName, RT_DIALOGW); + lppd->lpPageSetupTemplateName, (LPWSTR)RT_DIALOG); hDlgTmpl = LoadResource(lppd->hInstance, hResInfo); } else { - hResInfo = FindResourceW(COMDLG32_hInstance,(LPCWSTR)PAGESETUPDLGORD,RT_DIALOGW); + hResInfo = FindResourceW(COMDLG32_hInstance,(LPCWSTR)PAGESETUPDLGORD,(LPWSTR)RT_DIALOG); hDlgTmpl = LoadResource(COMDLG32_hInstance,hResInfo); } return hDlgTmpl; diff --git a/dlls/commdlg/printdlg16.c b/dlls/commdlg/printdlg16.c index 2b9d8e49584..8d8408062b7 100644 --- a/dlls/commdlg/printdlg16.c +++ b/dlls/commdlg/printdlg16.c @@ -222,7 +222,7 @@ static HGLOBAL16 PRINTDLG_Get16TemplateFrom32(char *PrintResourceName) LPVOID template; if (!(hResInfo = FindResourceA(COMDLG32_hInstance, - PrintResourceName, RT_DIALOGA))) + PrintResourceName, (LPSTR)RT_DIALOG))) { COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE); return 0; @@ -289,7 +289,7 @@ static HGLOBAL16 PRINTDLG_GetDlgTemplate16(PRINTDLG16 *lppd) hDlgTmpl = lppd->hSetupTemplate; } else if(lppd->Flags & PD_ENABLESETUPTEMPLATE) { hResInfo = FindResource16(lppd->hInstance, - MapSL(lppd->lpSetupTemplateName), RT_DIALOGA); + MapSL(lppd->lpSetupTemplateName), (LPSTR)RT_DIALOG); hDlgTmpl = LoadResource16(lppd->hInstance, hResInfo); } else { hDlgTmpl = PRINTDLG_Get16TemplateFrom32("PRINT32_SETUP"); @@ -300,7 +300,7 @@ static HGLOBAL16 PRINTDLG_GetDlgTemplate16(PRINTDLG16 *lppd) } else if(lppd->Flags & PD_ENABLEPRINTTEMPLATE) { hResInfo = FindResource16(lppd->hInstance, MapSL(lppd->lpPrintTemplateName), - RT_DIALOGA); + (LPSTR)RT_DIALOG); hDlgTmpl = LoadResource16(lppd->hInstance, hResInfo); } else { hDlgTmpl = PRINTDLG_Get16TemplateFrom32("PRINT32"); diff --git a/dlls/ddraw/dsurface/wndproc.c b/dlls/ddraw/dsurface/wndproc.c index 9356ebc7ba8..e2c2c8e62c9 100644 --- a/dlls/ddraw/dsurface/wndproc.c +++ b/dlls/ddraw/dsurface/wndproc.c @@ -40,7 +40,7 @@ void DirectDrawSurface_RegisterClass(void) memset(&wc, 0, sizeof(wc)); wc.lpfnWndProc = DirectDrawSurface_WndProc; wc.cbWndExtra = sizeof(IDirectDrawSurfaceImpl*); - wc.hCursor = (HCURSOR)IDC_ARROWA; + wc.hCursor = (HCURSOR)IDC_ARROW; wc.lpszClassName = "WINE_DDRAW"; RegisterClassA(&wc); } diff --git a/dlls/kernel/format_msg.c b/dlls/kernel/format_msg.c index 36b50d532f1..3bc513d1edd 100644 --- a/dlls/kernel/format_msg.c +++ b/dlls/kernel/format_msg.c @@ -73,7 +73,7 @@ static INT load_messageA( HMODULE instance, UINT id, WORD lang, TRACE("instance = %08lx, id = %08lx, buffer = %p, length = %ld\n", (DWORD)instance, (DWORD)id, buffer, (DWORD)buflen); - if (RtlFindMessage( instance, (ULONG)RT_MESSAGETABLEW, lang, id, &mre ) != STATUS_SUCCESS) return 0; + if (RtlFindMessage( instance, RT_MESSAGETABLE, lang, id, &mre ) != STATUS_SUCCESS) return 0; slen=mre->Length; TRACE(" - strlen=%d\n",slen); diff --git a/dlls/kernel/locale.c b/dlls/kernel/locale.c index e616d86bade..39542bbed4d 100644 --- a/dlls/kernel/locale.c +++ b/dlls/kernel/locale.c @@ -346,7 +346,7 @@ static LANGID get_language_id(LPCSTR Lang, LPCSTR Country, LPCSTR Charset, LPCST if(Country && strlen(Country) > 0) strncpy(l_data.country, Country, sizeof(l_data.country)); - EnumResourceLanguagesA(GetModuleHandleA("KERNEL32"), RT_STRINGA, + EnumResourceLanguagesA(GetModuleHandleA("KERNEL32"), (LPSTR)RT_STRING, (LPCSTR)LOCALE_ILANGUAGE, find_language_id_proc, (LPARAM)&l_data); strcpy(lang_string, l_data.lang); @@ -362,7 +362,7 @@ static LANGID get_language_id(LPCSTR Lang, LPCSTR Country, LPCSTR Charset, LPCST { MESSAGE("Warning: Language '%s' was not found, retrying without country name...\n", lang_string); l_data.country[0] = 0; - EnumResourceLanguagesA(GetModuleHandleA("KERNEL32"), RT_STRINGA, + EnumResourceLanguagesA(GetModuleHandleA("KERNEL32"), (LPSTR)RT_STRING, (LPCSTR)LOCALE_ILANGUAGE, find_language_id_proc, (LONG)&l_data); } } @@ -732,7 +732,7 @@ INT WINAPI GetLocaleInfoW( LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len ) lang_id = MAKELANGID(PRIMARYLANGID(lang_id), SUBLANG_DEFAULT); hModule = GetModuleHandleA( "kernel32.dll" ); - if (!(hrsrc = FindResourceExW( hModule, RT_STRINGW, (LPCWSTR)((lctype >> 4) + 1), lang_id ))) + if (!(hrsrc = FindResourceExW( hModule, (LPWSTR)RT_STRING, (LPCWSTR)((lctype >> 4) + 1), lang_id ))) { SetLastError( ERROR_INVALID_FLAGS ); /* no such lctype */ return 0; @@ -904,7 +904,7 @@ LCID WINAPI ConvertDefaultLocale( LCID lcid ) BOOL WINAPI IsValidLocale( LCID lcid, DWORD flags ) { /* check if language is registered in the kernel32 resources */ - return FindResourceExW( GetModuleHandleA("KERNEL32"), RT_STRINGW, + return FindResourceExW( GetModuleHandleA("KERNEL32"), (LPWSTR)RT_STRING, (LPCWSTR)LOCALE_ILANGUAGE, LANGIDFROMLCID(lcid)) != 0; } @@ -936,7 +936,7 @@ BOOL WINAPI EnumSystemLocalesA(LOCALE_ENUMPROCA lpfnLocaleEnum, DWORD flags) { TRACE("(%p,%08lx)\n", lpfnLocaleEnum,flags); - EnumResourceLanguagesA( GetModuleHandleA("KERNEL32"), RT_STRINGA, + EnumResourceLanguagesA( GetModuleHandleA("KERNEL32"), (LPSTR)RT_STRING, (LPCSTR)LOCALE_ILANGUAGE, enum_lang_proc_a, (LONG)lpfnLocaleEnum); return TRUE; @@ -949,7 +949,7 @@ BOOL WINAPI EnumSystemLocalesA(LOCALE_ENUMPROCA lpfnLocaleEnum, BOOL WINAPI EnumSystemLocalesW( LOCALE_ENUMPROCW lpfnLocaleEnum, DWORD flags ) { TRACE("(%p,%08lx)\n", lpfnLocaleEnum,flags); - EnumResourceLanguagesW( GetModuleHandleA("KERNEL32"), RT_STRINGW, + EnumResourceLanguagesW( GetModuleHandleA("KERNEL32"), (LPWSTR)RT_STRING, (LPCWSTR)LOCALE_ILANGUAGE, enum_lang_proc_w, (LONG)lpfnLocaleEnum); return TRUE; diff --git a/dlls/kernel/resource16.c b/dlls/kernel/resource16.c index 8cfbe607ee2..a00a89aa87b 100644 --- a/dlls/kernel/resource16.c +++ b/dlls/kernel/resource16.c @@ -811,16 +811,16 @@ static HGLOBAL16 NE_LoadPEResource( NE_MODULE *pModule, WORD type, LPVOID bits, switch (type) { - case RT_MENU16: + case RT_MENU: ConvertMenu32To16( bits, size, GlobalLock16( handle ) ); break; - case RT_DIALOG16: + case RT_DIALOG: ConvertDialog32To16( bits, size, GlobalLock16( handle ) ); break; - case RT_ACCELERATOR16: + case RT_ACCELERATOR: ConvertAccelerator32To16( bits, size, GlobalLock16( handle ) ); break; - case RT_STRING16: + case RT_STRING: FIXME("not yet implemented!\n" ); /* fall through */ default: diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index 09156a22683..2e137c3d1ac 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -202,7 +202,7 @@ extern int atoi(const char *); static LCID MSVCRT_locale_to_LCID(locale_search_t* locale) { LCID lcid; - EnumResourceLanguagesA(GetModuleHandleA("KERNEL32"), RT_STRINGA, + EnumResourceLanguagesA(GetModuleHandleA("KERNEL32"), (LPSTR)RT_STRING, (LPCSTR)LOCALE_ILANGUAGE,find_best_locale_proc, (LONG)locale); diff --git a/dlls/richedit/richedit.c b/dlls/richedit/richedit.c index 9744f4da775..3cf8edc5f85 100644 --- a/dlls/richedit/richedit.c +++ b/dlls/richedit/richedit.c @@ -803,7 +803,7 @@ VOID RICHED32_Register(void) wndClass.lpfnWndProc = (WNDPROC)RICHED32_WindowProc; wndClass.cbClsExtra = 0; wndClass.cbWndExtra = 0; /*(sizeof(RICHED32_INFO *);*/ - wndClass.hCursor = LoadCursorA(0, IDC_ARROWA); + wndClass.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); wndClass.lpszClassName = RICHEDIT_CLASS10A; /* WC_RICHED32A; */ diff --git a/dlls/setupapi/virtcopy.c b/dlls/setupapi/virtcopy.c index 5bb4e971039..2f6562285f0 100644 --- a/dlls/setupapi/virtcopy.c +++ b/dlls/setupapi/virtcopy.c @@ -613,7 +613,7 @@ BOOL VCP_UI_GetDialogTemplate(LPCVOID *template32) HRSRC hResInfo; HGLOBAL hDlgTmpl32; - if (!(hResInfo = FindResourceA(SETUPAPI_hInstance, MAKEINTRESOURCEA(COPYFILEDLGORD), RT_DIALOGA))) + if (!(hResInfo = FindResourceA(SETUPAPI_hInstance, MAKEINTRESOURCEA(COPYFILEDLGORD), (LPSTR)RT_DIALOG))) return FALSE; if (!(hDlgTmpl32 = LoadResource(SETUPAPI_hInstance, hResInfo )) || !(*template32 = LockResource( hDlgTmpl32 ))) @@ -652,7 +652,7 @@ void VCP_UI_RegisterProgressClass(void) wndClass.lpfnWndProc = (WNDPROC)VCP_UI_FileCopyWndProc; wndClass.cbClsExtra = 0; wndClass.cbWndExtra = 0; - wndClass.hCursor = LoadCursorA (0, IDC_ARROWA); + wndClass.hCursor = LoadCursorA (0, (LPSTR)IDC_ARROW); wndClass.hbrBackground = NULL; wndClass.lpszClassName = "setupx_progress"; diff --git a/dlls/shell32/brsfolder.c b/dlls/shell32/brsfolder.c index abb669d0f45..a06c2e9590e 100644 --- a/dlls/shell32/brsfolder.c +++ b/dlls/shell32/brsfolder.c @@ -219,7 +219,7 @@ static void FillTreeView(IShellFolder * lpsf, LPITEMIDLIST pidl, HTREEITEM hPar TRACE("%p %p %x\n",lpsf, pidl, (INT)hParent); SetCapture(GetParent(hwndTreeView)); - SetCursor(LoadCursorA(0, IDC_WAITA)); + SetCursor(LoadCursorA(0, (LPSTR)IDC_WAIT)); while (NOERROR == IEnumIDList_Next(lpe,1,&pidlTemp,&ulFetched)) { @@ -253,7 +253,7 @@ static void FillTreeView(IShellFolder * lpsf, LPITEMIDLIST pidl, HTREEITEM hPar Done: ReleaseCapture(); - SetCursor(LoadCursorW(0, IDC_ARROWW)); + SetCursor(LoadCursorW(0, (LPWSTR)IDC_ARROW)); if (pidlTemp) SHFree(pidlTemp); diff --git a/dlls/shell32/dialogs.c b/dlls/shell32/dialogs.c index cb8146d61ee..86e01a41cb1 100644 --- a/dlls/shell32/dialogs.c +++ b/dlls/shell32/dialogs.c @@ -97,7 +97,7 @@ void WINAPI RunFileDlg( rfdp.lpstrDescription = lpstrDescription; rfdp.uFlags = uFlags; - if(!(hRes = FindResourceA(shell32_hInstance, "SHELL_RUN_DLG", RT_DIALOGA))) + if(!(hRes = FindResourceA(shell32_hInstance, "SHELL_RUN_DLG", (LPSTR)RT_DIALOG))) { MessageBoxA (hwndOwner, "Couldn't find dialog.", "Nix", MB_OK) ; return; @@ -127,7 +127,8 @@ INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar prfdp = (RUNFILEDLGPARAMS *)lParam ; SetWindowTextA (hwnd, prfdp->lpstrTitle) ; SetClassLongA (hwnd, GCL_HICON, (LPARAM)prfdp->hIcon) ; - SendMessageA (GetDlgItem (hwnd, 12297), STM_SETICON, (WPARAM)LoadIconA (NULL, IDI_WINLOGOA), 0) ; + SendMessageA (GetDlgItem (hwnd, 12297), STM_SETICON, + (WPARAM)LoadIconA (NULL, (LPSTR)IDI_WINLOGO), 0); FillList (GetDlgItem (hwnd, 12298), NULL) ; SetFocus (GetDlgItem (hwnd, 12298)) ; return TRUE ; diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c index e13205e3109..4fe3cb9486b 100644 --- a/dlls/shell32/shell32_main.c +++ b/dlls/shell32/shell32_main.c @@ -868,7 +868,7 @@ BOOL WINAPI ShellAboutA( HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff, LPVOID template; TRACE("\n"); - if(!(hRes = FindResourceA(shell32_hInstance, "SHELL_ABOUT_MSGBOX", RT_DIALOGA))) + if(!(hRes = FindResourceA(shell32_hInstance, "SHELL_ABOUT_MSGBOX", (LPSTR)RT_DIALOG))) return FALSE; if(!(template = (LPVOID)LoadResource(shell32_hInstance, hRes))) return FALSE; @@ -876,7 +876,7 @@ BOOL WINAPI ShellAboutA( HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff, info.szApp = szApp; info.szOtherStuff = szOtherStuff; info.hIcon = hIcon; - if (!hIcon) info.hIcon = LoadIconA( 0, IDI_WINLOGOA ); + if (!hIcon) info.hIcon = LoadIconA( 0, (LPSTR)IDI_WINLOGO ); return DialogBoxIndirectParamA( (HINSTANCE)GetWindowLongA( hWnd, GWL_HINSTANCE ), template, hWnd, AboutDlgProc, (LPARAM)&info ); } @@ -894,7 +894,7 @@ BOOL WINAPI ShellAboutW( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, TRACE("\n"); - if(!(hRes = FindResourceA(shell32_hInstance, "SHELL_ABOUT_MSGBOX", RT_DIALOGA))) + if(!(hRes = FindResourceA(shell32_hInstance, "SHELL_ABOUT_MSGBOX", (LPSTR)RT_DIALOG))) return FALSE; if(!(template = (LPVOID)LoadResource(shell32_hInstance, hRes))) return FALSE; @@ -902,7 +902,7 @@ BOOL WINAPI ShellAboutW( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, info.szApp = HEAP_strdupWtoA( GetProcessHeap(), 0, szApp ); info.szOtherStuff = HEAP_strdupWtoA( GetProcessHeap(), 0, szOtherStuff ); info.hIcon = hIcon; - if (!hIcon) info.hIcon = LoadIconA( 0, IDI_WINLOGOA ); + if (!hIcon) info.hIcon = LoadIconA( 0, (LPSTR)IDI_WINLOGO ); ret = DialogBoxIndirectParamA((HINSTANCE)GetWindowLongA( hWnd, GWL_HINSTANCE ), template, hWnd, AboutDlgProc, (LPARAM)&info ); HeapFree( GetProcessHeap(), 0, (LPSTR)info.szApp ); diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c index e08c6a309f5..5e26871a806 100644 --- a/dlls/shell32/shlview.c +++ b/dlls/shell32/shlview.c @@ -1694,7 +1694,7 @@ static HRESULT WINAPI IShellView_fnCreateViewWindow( wc.cbWndExtra = 0; wc.hInstance = shell32_hInstance; wc.hIcon = 0; - wc.hCursor = LoadCursorA (0, IDC_ARROWA); + wc.hCursor = LoadCursorA (0, (LPSTR)IDC_ARROW); wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1); wc.lpszMenuName = NULL; wc.lpszClassName = SV_CLASS_NAME; diff --git a/dlls/shell32/systray.c b/dlls/shell32/systray.c index 55a4b110c83..36afe90c5fe 100644 --- a/dlls/shell32/systray.c +++ b/dlls/shell32/systray.c @@ -168,7 +168,7 @@ BOOL SYSTRAY_RegisterClass(void) wc.cbWndExtra = 0; wc.hInstance = 0; wc.hIcon = 0; - wc.hCursor = LoadCursorA(0, IDC_ARROWA); + wc.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); wc.hbrBackground = (HBRUSH)(COLOR_WINDOW); wc.lpszMenuName = NULL; wc.lpszClassName = "WineSystray"; diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c index 7b7ac6eb791..6df04ee00ab 100644 --- a/dlls/shlwapi/ordinal.c +++ b/dlls/shlwapi/ordinal.c @@ -2564,7 +2564,7 @@ HWND WINAPI SHLWAPI_257(LONG wndProc, HWND hWndParent, DWORD dwExStyle, wc.cbWndExtra = 4; wc.hInstance = shlwapi_hInstance; wc.hIcon = (HICON)0; - wc.hCursor = LoadCursorA((HINSTANCE)0, IDC_ARROWA); + wc.hCursor = LoadCursorA((HINSTANCE)0, (LPSTR)IDC_ARROW); wc.hbrBackground = (HBRUSH)COLOR_BTNSHADOW; wc.lpszMenuName = NULL; wc.lpszClassName = szClass; @@ -2851,7 +2851,7 @@ HWND WINAPI SHLWAPI_278(LONG wndProc, HWND hWndParent, DWORD dwExStyle, wc.cbWndExtra = 4; wc.hInstance = shlwapi_hInstance; wc.hIcon = (HICON)0; - wc.hCursor = LoadCursorA((HINSTANCE)0, IDC_ARROWA); + wc.hCursor = LoadCursorA((HINSTANCE)0, (LPSTR)IDC_ARROW); wc.hbrBackground = (HBRUSH)COLOR_BTNSHADOW; wc.lpszMenuName = NULL; wc.lpszClassName = szClass; diff --git a/dlls/user/controls.h b/dlls/user/controls.h index df1ccd40f49..fdfa6160ffe 100644 --- a/dlls/user/controls.h +++ b/dlls/user/controls.h @@ -35,13 +35,13 @@ /* Built-in class descriptor */ struct builtin_class_descr { - LPCSTR name; /* class name */ - UINT style; /* class style */ - WNDPROC procA; /* ASCII window procedure */ - WNDPROC procW; /* Unicode window procedure */ - INT extra; /* window extra bytes */ - LPCSTR cursor; /* cursor name */ - HBRUSH brush; /* brush or system color */ + LPCSTR name; /* class name */ + UINT style; /* class style */ + WNDPROC procA; /* ASCII window procedure */ + WNDPROC procW; /* Unicode window procedure */ + INT extra; /* window extra bytes */ + ULONG_PTR cursor; /* cursor id */ + HBRUSH brush; /* brush or system color */ }; diff --git a/dlls/user/dialog16.c b/dlls/user/dialog16.c index 04a4cf6a477..85e52c9a90c 100644 --- a/dlls/user/dialog16.c +++ b/dlls/user/dialog16.c @@ -700,7 +700,7 @@ INT16 WINAPI DialogBoxParam16( HINSTANCE16 hInst, LPCSTR template, LPCVOID data; int ret = -1; - if (!(hRsrc = FindResource16( hInst, template, RT_DIALOGA ))) return 0; + if (!(hRsrc = FindResource16( hInst, template, (LPSTR)RT_DIALOG ))) return 0; if (!(hmem = LoadResource16( hInst, hRsrc ))) return 0; if ((data = LockResource16( hmem ))) { @@ -745,7 +745,7 @@ HWND16 WINAPI CreateDialogParam16( HINSTANCE16 hInst, LPCSTR dlgTemplate, TRACE("%04x,%s,%04x,%08lx,%ld\n", hInst, debugstr_a(dlgTemplate), owner, (DWORD)dlgProc, param ); - if (!(hRsrc = FindResource16( hInst, dlgTemplate, RT_DIALOGA ))) return 0; + if (!(hRsrc = FindResource16( hInst, dlgTemplate, (LPSTR)RT_DIALOG ))) return 0; if (!(hmem = LoadResource16( hInst, hRsrc ))) return 0; if (!(data = LockResource16( hmem ))) hwnd = 0; else hwnd = CreateDialogIndirectParam16( hInst, data, owner, dlgProc, param ); diff --git a/dlls/user/exticon.c b/dlls/user/exticon.c index f30db6d59ca..4c9307585e0 100644 --- a/dlls/user/exticon.c +++ b/dlls/user/exticon.c @@ -442,7 +442,7 @@ static UINT ICO_ExtractIconExW( } /* search for the group icon directory */ - if (!(icongroupresdir = find_entry_by_id(rootresdir, LOWORD(RT_GROUP_ICONW), rootresdir))) + if (!(icongroupresdir = find_entry_by_id(rootresdir, LOWORD(RT_GROUP_ICON), rootresdir))) { WARN("No Icongroupresourcedirectory!\n"); goto end; /* failure */ @@ -533,7 +533,7 @@ static UINT ICO_ExtractIconExW( pIconId[i] = LookupIconIdFromDirectoryEx(igdata, TRUE, (i & 1) ? cx2 : cx1, (i & 1) ? cy2 : cy1, flags); } - if (!(iconresdir=find_entry_by_id(rootresdir,LOWORD(RT_ICONW),rootresdir))) + if (!(iconresdir=find_entry_by_id(rootresdir,LOWORD(RT_ICON),rootresdir))) { WARN("No Iconresourcedirectory!\n"); goto end; /* failure */ diff --git a/dlls/user/resource.c b/dlls/user/resource.c index 28630b06865..6080c62286f 100644 --- a/dlls/user/resource.c +++ b/dlls/user/resource.c @@ -53,7 +53,7 @@ HACCEL16 WINAPI LoadAccelerators16(HINSTANCE16 instance, LPCSTR lpTableName) TRACE_(accel)("%04x %s\n", instance, debugstr_a(lpTableName) ); - if (!(hRsrc = FindResource16( instance, lpTableName, RT_ACCELERATORA ))) { + if (!(hRsrc = FindResource16( instance, lpTableName, (LPSTR)RT_ACCELERATOR ))) { WARN_(accel)("couldn't find accelerator table resource\n"); return 0; } @@ -85,7 +85,7 @@ HACCEL WINAPI LoadAcceleratorsW(HINSTANCE instance,LPCWSTR lpTableName) TRACE_(accel)("%p 0x%04x\n", (LPVOID)instance, LOWORD(lpTableName) ); - if (!(hRsrc = FindResourceW( instance, lpTableName, RT_ACCELERATORW ))) + if (!(hRsrc = FindResourceW( instance, lpTableName, (LPWSTR)RT_ACCELERATOR ))) { WARN_(accel)("couldn't find accelerator table resource\n"); } else { @@ -326,7 +326,7 @@ INT16 WINAPI LoadString16( HINSTANCE16 instance, UINT16 resource_id, TRACE("inst=%04x id=%04x buff=%08x len=%d\n", instance, resource_id, (int) buffer, buflen); - hrsrc = FindResource16( instance, (LPCSTR)((resource_id>>4)+1), RT_STRINGA ); + hrsrc = FindResource16( instance, (LPCSTR)((resource_id>>4)+1), (LPSTR)RT_STRING ); if (!hrsrc) return 0; hmem = LoadResource16( instance, hrsrc ); if (!hmem) return 0; @@ -376,7 +376,7 @@ INT WINAPI LoadStringW( HINSTANCE instance, UINT resource_id, /* Use bits 4 - 19 (incremented by 1) as resourceid, mask out * 20 - 31. */ hrsrc = FindResourceW( instance, (LPCWSTR)(((resource_id>>4)&0xffff)+1), - RT_STRINGW ); + (LPWSTR)RT_STRING ); if (!hrsrc) return 0; hmem = LoadResource( instance, hrsrc ); if (!hmem) return 0; diff --git a/dlls/user/tests/sysparams.c b/dlls/user/tests/sysparams.c index ba421f292c5..16158e3d302 100644 --- a/dlls/user/tests/sysparams.c +++ b/dlls/user/tests/sysparams.c @@ -28,13 +28,6 @@ #include "winreg.h" #include "winuser.h" -#ifndef IDI_APPLICATIONA -# define IDI_APPLICATIONA IDI_APPLICATION -#endif -#ifndef IDC_ARROWA -# define IDC_ARROWA IDC_ARROW -#endif - #ifndef SPI_GETDESKWALLPAPER # define SPI_GETDESKWALLPAPER 0x0073 #endif @@ -1121,8 +1114,8 @@ START_TEST(sysparams) wc.lpfnWndProc = SysParamsTestWndProc; wc.style = CS_OWNDC | CS_VREDRAW | CS_HREDRAW; wc.hInstance = hInstance; - wc.hIcon = LoadIconA( 0, IDI_APPLICATIONA ); - wc.hCursor = LoadCursorA( 0, IDC_ARROWA ); + wc.hIcon = LoadIconA( 0, (LPSTR)IDI_APPLICATION ); + wc.hCursor = LoadCursorA( 0, (LPSTR)IDC_ARROW ); wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1 ); wc.lpszMenuName = 0; wc.cbClsExtra = 0; diff --git a/dlls/user/tests/win.c b/dlls/user/tests/win.c index 6aa3b8c2e20..6bc53aa2e6d 100644 --- a/dlls/user/tests/win.c +++ b/dlls/user/tests/win.c @@ -31,10 +31,6 @@ #include "wine/test.h" -#ifndef IDC_ARROWA -# define IDC_ARROWA IDC_ARROW -#endif - #ifndef SPI_GETDESKWALLPAPER #define SPI_GETDESKWALLPAPER 0x0073 #endif @@ -368,7 +364,7 @@ static BOOL RegisterWindowClasses(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(0); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROWA); + cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "MainWindowClass"; @@ -381,7 +377,7 @@ static BOOL RegisterWindowClasses(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(0); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROWA); + cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "ToolWindowClass"; diff --git a/dlls/winmm/mci.c b/dlls/winmm/mci.c index 7f90f3835d2..9fb57a1c3ae 100644 --- a/dlls/winmm/mci.c +++ b/dlls/winmm/mci.c @@ -309,7 +309,7 @@ static UINT MCI_GetCommandTable(UINT uDevType) } uTbl = MCI_NO_COMMAND_TABLE; if (str) { - HRSRC hRsrc = FindResourceA(WINMM_IData->hWinMM32Instance, str, (LPCSTR)RT_RCDATAA); + HRSRC hRsrc = FindResourceA(WINMM_IData->hWinMM32Instance, str, (LPCSTR)RT_RCDATA); HANDLE hMem = 0; if (hRsrc) hMem = LoadResource(WINMM_IData->hWinMM32Instance, hRsrc); @@ -1119,7 +1119,7 @@ UINT WINAPI mciLoadCommandResource(HINSTANCE hInst, LPCWSTR resNameW, UINT type) } #endif } - if (!(hRsrc = FindResourceW(hInst, resNameW, RT_RCDATAW))) { + if (!(hRsrc = FindResourceW(hInst, resNameW, (LPWSTR)RT_RCDATA))) { WARN("No command table found in resource\n"); } else if ((hMem = LoadResource(hInst, hRsrc))) { ret = MCI_SetCommandTable(LockResource(hMem), type); diff --git a/dlls/winmm/mciavi/wnd.c b/dlls/winmm/mciavi/wnd.c index 04450bb3fba..9cb74ff0dc0 100644 --- a/dlls/winmm/mciavi/wnd.c +++ b/dlls/winmm/mciavi/wnd.c @@ -96,7 +96,7 @@ BOOL MCIAVI_CreateWindow(WINE_MCIAVI* wma, DWORD dwFlags, LPMCI_DGV_OPEN_PARM wndClass.lpfnWndProc = (WNDPROC)MCIAVI_WindowProc; wndClass.cbClsExtra = 0; wndClass.cbWndExtra = sizeof(WINE_MCIAVI*); - wndClass.hCursor = LoadCursorA(0, IDC_ARROWA); + wndClass.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); wndClass.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); wndClass.lpszClassName = "MCIAVI"; @@ -232,4 +232,3 @@ DWORD MCIAVI_mciWindow(UINT wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMSA lpPar return 0; } - diff --git a/dlls/winmm/mmsystem.c b/dlls/winmm/mmsystem.c index 5bd2fb074ff..0c5102bed72 100644 --- a/dlls/winmm/mmsystem.c +++ b/dlls/winmm/mmsystem.c @@ -2564,7 +2564,7 @@ UINT16 WINAPI mciLoadCommandResource16(HINSTANCE16 hInst, LPCSTR resname, UINT16 HGLOBAL16 handle; void *ptr; - if (!(res = FindResource16( hInst, resname, RT_RCDATAA))) return MCI_NO_COMMAND_TABLE; + if (!(res = FindResource16( hInst, resname, (LPSTR)RT_RCDATA))) return MCI_NO_COMMAND_TABLE; if (!(handle = LoadResource16( hInst, res ))) return MCI_NO_COMMAND_TABLE; ptr = LockResource16(handle); return MCI_SetCommandTable(ptr, type); diff --git a/dlls/x11drv/desktop.c b/dlls/x11drv/desktop.c index 3dfa4878ad6..494d95eb23d 100644 --- a/dlls/x11drv/desktop.c +++ b/dlls/x11drv/desktop.c @@ -51,7 +51,7 @@ static LRESULT WINAPI desktop_winproc( HWND hwnd, UINT message, WPARAM wParam, L break; case WM_SETCURSOR: - return (LRESULT)SetCursor( LoadCursorA( 0, IDC_ARROWA ) ); + return (LRESULT)SetCursor( LoadCursorA( 0, (LPSTR)IDC_ARROW ) ); case WM_NCHITTEST: return HTCLIENT; diff --git a/include/wine/winuser16.h b/include/wine/winuser16.h index 02f337a6dbf..161e5732342 100644 --- a/include/wine/winuser16.h +++ b/include/wine/winuser16.h @@ -440,23 +440,6 @@ typedef struct #define GFSR_GDIRESOURCES 0x0001 #define GFSR_USERRESOURCES 0x0002 -#define MAKEINTRESOURCE16(i) (SEGPTR)((DWORD)((WORD)(i))) - -/* Predefined resource types */ -#define RT_CURSOR16 MAKEINTRESOURCE16(1) -#define RT_BITMAP16 MAKEINTRESOURCE16(2) -#define RT_ICON16 MAKEINTRESOURCE16(3) -#define RT_MENU16 MAKEINTRESOURCE16(4) -#define RT_DIALOG16 MAKEINTRESOURCE16(5) -#define RT_STRING16 MAKEINTRESOURCE16(6) -#define RT_FONTDIR16 MAKEINTRESOURCE16(7) -#define RT_FONT16 MAKEINTRESOURCE16(8) -#define RT_ACCELERATOR16 MAKEINTRESOURCE16(9) -#define RT_RCDATA16 MAKEINTRESOURCE16(10) -#define RT_MESSAGELIST16 MAKEINTRESOURCE16(11) -#define RT_GROUP_CURSOR16 MAKEINTRESOURCE16(12) -#define RT_GROUP_ICON16 MAKEINTRESOURCE16(14) - /* CreateWindow() coordinates */ #define CW_USEDEFAULT16 ((INT16)0x8000) diff --git a/include/winuser.h b/include/winuser.h index aca1670c240..df0554069ab 100644 --- a/include/winuser.h +++ b/include/winuser.h @@ -497,69 +497,35 @@ typedef struct #define MAKEINTRESOURCEA(i) (LPSTR)((ULONG_PTR)((WORD)(i))) #define MAKEINTRESOURCEW(i) (LPWSTR)((ULONG_PTR)((WORD)(i))) + +#ifdef __WINESRC__ +/* force using a cast when inside Wine */ +#define MAKEINTRESOURCE(i) ((ULONG_PTR)((WORD)(i))) +#else #define MAKEINTRESOURCE WINELIB_NAME_AW(MAKEINTRESOURCE) +#endif /* Predefined resource types */ -#define RT_CURSORA MAKEINTRESOURCEA(1) -#define RT_CURSORW MAKEINTRESOURCEW(1) -#define RT_CURSOR WINELIB_NAME_AW(RT_CURSOR) -#define RT_BITMAPA MAKEINTRESOURCEA(2) -#define RT_BITMAPW MAKEINTRESOURCEW(2) -#define RT_BITMAP WINELIB_NAME_AW(RT_BITMAP) -#define RT_ICONA MAKEINTRESOURCEA(3) -#define RT_ICONW MAKEINTRESOURCEW(3) -#define RT_ICON WINELIB_NAME_AW(RT_ICON) -#define RT_MENUA MAKEINTRESOURCEA(4) -#define RT_MENUW MAKEINTRESOURCEW(4) -#define RT_MENU WINELIB_NAME_AW(RT_MENU) -#define RT_DIALOGA MAKEINTRESOURCEA(5) -#define RT_DIALOGW MAKEINTRESOURCEW(5) -#define RT_DIALOG WINELIB_NAME_AW(RT_DIALOG) -#define RT_STRINGA MAKEINTRESOURCEA(6) -#define RT_STRINGW MAKEINTRESOURCEW(6) -#define RT_STRING WINELIB_NAME_AW(RT_STRING) -#define RT_FONTDIRA MAKEINTRESOURCEA(7) -#define RT_FONTDIRW MAKEINTRESOURCEW(7) -#define RT_FONTDIR WINELIB_NAME_AW(RT_FONTDIR) -#define RT_FONTA MAKEINTRESOURCEA(8) -#define RT_FONTW MAKEINTRESOURCEW(8) -#define RT_FONT WINELIB_NAME_AW(RT_FONT) -#define RT_ACCELERATORA MAKEINTRESOURCEA(9) -#define RT_ACCELERATORW MAKEINTRESOURCEW(9) -#define RT_ACCELERATOR WINELIB_NAME_AW(RT_ACCELERATOR) -#define RT_RCDATAA MAKEINTRESOURCEA(10) -#define RT_RCDATAW MAKEINTRESOURCEW(10) -#define RT_RCDATA WINELIB_NAME_AW(RT_RCDATA) -#define RT_MESSAGETABLEA MAKEINTRESOURCEA(11) -#define RT_MESSAGETABLEW MAKEINTRESOURCEW(11) -#define RT_MESSAGETABLE WINELIB_NAME_AW(RT_MESSAGETABLE) -#define RT_GROUP_CURSORA MAKEINTRESOURCEA(12) -#define RT_GROUP_CURSORW MAKEINTRESOURCEW(12) -#define RT_GROUP_CURSOR WINELIB_NAME_AW(RT_GROUP_CURSOR) -#define RT_GROUP_ICONA MAKEINTRESOURCEA(14) -#define RT_GROUP_ICONW MAKEINTRESOURCEW(14) -#define RT_GROUP_ICON WINELIB_NAME_AW(RT_GROUP_ICON) -#define RT_VERSIONA MAKEINTRESOURCEA(16) -#define RT_VERSIONW MAKEINTRESOURCEW(16) -#define RT_VERSION WINELIB_NAME_AW(RT_VERSION) -#define RT_DLGINCLUDEA MAKEINTRESOURCEA(17) -#define RT_DLGINCLUDEW MAKEINTRESOURCEW(17) -#define RT_DLGINCLUDE WINELIB_NAME_AW(RT_DLGINCLUDE) -#define RT_PLUGPLAYA MAKEINTRESOURCEA(19) -#define RT_PLUGPLAYW MAKEINTRESOURCEW(19) -#define RT_PLUGPLAY WINELIB_NAME_AW(RT_PLUGPLAY) -#define RT_VXDA MAKEINTRESOURCEA(20) -#define RT_VXDW MAKEINTRESOURCEW(20) -#define RT_VXD WINELIB_NAME_AW(RT_VXD) -#define RT_ANICURSORA MAKEINTRESOURCEA(21) -#define RT_ANICURSORW MAKEINTRESOURCEW(21) -#define RT_ANICURSOR WINELIB_NAME_AW(RT_ANICURSOR) -#define RT_ANIICONA MAKEINTRESOURCEA(22) -#define RT_ANIICONW MAKEINTRESOURCEW(22) -#define RT_ANIICON WINELIB_NAME_AW(RT_ANIICON) -#define RT_HTMLA MAKEINTRESOURCEA(23) -#define RT_HTMLW MAKEINTRESOURCEW(23) -#define RT_HTML WINELIB_NAME_AW(RT_HTML) +#define RT_CURSOR MAKEINTRESOURCE(1) +#define RT_BITMAP MAKEINTRESOURCE(2) +#define RT_ICON MAKEINTRESOURCE(3) +#define RT_MENU MAKEINTRESOURCE(4) +#define RT_DIALOG MAKEINTRESOURCE(5) +#define RT_STRING MAKEINTRESOURCE(6) +#define RT_FONTDIR MAKEINTRESOURCE(7) +#define RT_FONT MAKEINTRESOURCE(8) +#define RT_ACCELERATOR MAKEINTRESOURCE(9) +#define RT_RCDATA MAKEINTRESOURCE(10) +#define RT_MESSAGETABLE MAKEINTRESOURCE(11) +#define RT_GROUP_CURSOR MAKEINTRESOURCE(12) +#define RT_GROUP_ICON MAKEINTRESOURCE(14) +#define RT_VERSION MAKEINTRESOURCE(16) +#define RT_DLGINCLUDE MAKEINTRESOURCE(17) +#define RT_PLUGPLAY MAKEINTRESOURCE(19) +#define RT_VXD MAKEINTRESOURCE(20) +#define RT_ANICURSOR MAKEINTRESOURCE(21) +#define RT_ANIICON MAKEINTRESOURCE(22) +#define RT_HTML MAKEINTRESOURCE(23) /* cbWndExtra bytes for dialog class */ @@ -2532,77 +2498,33 @@ typedef struct #define SLE_WARNING 0x00000003 /* Predefined resources */ -#define IDI_APPLICATIONA MAKEINTRESOURCEA(32512) -#define IDI_APPLICATIONW MAKEINTRESOURCEW(32512) -#define IDI_APPLICATION WINELIB_NAME_AW(IDI_APPLICATION) -#define IDI_HANDA MAKEINTRESOURCEA(32513) -#define IDI_HANDW MAKEINTRESOURCEW(32513) -#define IDI_HAND WINELIB_NAME_AW(IDI_HAND) -#define IDI_QUESTIONA MAKEINTRESOURCEA(32514) -#define IDI_QUESTIONW MAKEINTRESOURCEW(32514) -#define IDI_QUESTION WINELIB_NAME_AW(IDI_QUESTION) -#define IDI_EXCLAMATIONA MAKEINTRESOURCEA(32515) -#define IDI_EXCLAMATIONW MAKEINTRESOURCEW(32515) -#define IDI_EXCLAMATION WINELIB_NAME_AW(IDI_EXCLAMATION) -#define IDI_ASTERISKA MAKEINTRESOURCEA(32516) -#define IDI_ASTERISKW MAKEINTRESOURCEW(32516) -#define IDI_ASTERISK WINELIB_NAME_AW(IDI_ASTERISK) -#define IDI_WINLOGOA MAKEINTRESOURCEA(32517) -#define IDI_WINLOGOW MAKEINTRESOURCEW(32517) -#define IDI_WINLOGO WINELIB_NAME_AW(IDI_WINLOGO) +#define IDI_APPLICATION MAKEINTRESOURCE(32512) +#define IDI_HAND MAKEINTRESOURCE(32513) +#define IDI_QUESTION MAKEINTRESOURCE(32514) +#define IDI_EXCLAMATION MAKEINTRESOURCE(32515) +#define IDI_ASTERISK MAKEINTRESOURCE(32516) +#define IDI_WINLOGO MAKEINTRESOURCE(32517) #define IDI_WARNING IDI_EXCLAMATION #define IDI_ERROR IDI_HAND #define IDI_INFORMATION IDI_ASTERISK -#define IDC_ARROWA MAKEINTRESOURCEA(32512) -#define IDC_ARROWW MAKEINTRESOURCEW(32512) -#define IDC_ARROW WINELIB_NAME_AW(IDC_ARROW) -#define IDC_IBEAMA MAKEINTRESOURCEA(32513) -#define IDC_IBEAMW MAKEINTRESOURCEW(32513) -#define IDC_IBEAM WINELIB_NAME_AW(IDC_IBEAM) -#define IDC_WAITA MAKEINTRESOURCEA(32514) -#define IDC_WAITW MAKEINTRESOURCEW(32514) -#define IDC_WAIT WINELIB_NAME_AW(IDC_WAIT) -#define IDC_CROSSA MAKEINTRESOURCEA(32515) -#define IDC_CROSSW MAKEINTRESOURCEW(32515) -#define IDC_CROSS WINELIB_NAME_AW(IDC_CROSS) -#define IDC_UPARROWA MAKEINTRESOURCEA(32516) -#define IDC_UPARROWW MAKEINTRESOURCEW(32516) -#define IDC_UPARROW WINELIB_NAME_AW(IDC_UPARROW) -#define IDC_SIZEA MAKEINTRESOURCEA(32640) -#define IDC_SIZEW MAKEINTRESOURCEW(32640) -#define IDC_SIZE WINELIB_NAME_AW(IDC_SIZE) -#define IDC_ICONA MAKEINTRESOURCEA(32641) -#define IDC_ICONW MAKEINTRESOURCEW(32641) -#define IDC_ICON WINELIB_NAME_AW(IDC_ICON) -#define IDC_SIZENWSEA MAKEINTRESOURCEA(32642) -#define IDC_SIZENWSEW MAKEINTRESOURCEW(32642) -#define IDC_SIZENWSE WINELIB_NAME_AW(IDC_SIZENWSE) -#define IDC_SIZENESWA MAKEINTRESOURCEA(32643) -#define IDC_SIZENESWW MAKEINTRESOURCEW(32643) -#define IDC_SIZENESW WINELIB_NAME_AW(IDC_SIZENESW) -#define IDC_SIZEWEA MAKEINTRESOURCEA(32644) -#define IDC_SIZEWEW MAKEINTRESOURCEW(32644) -#define IDC_SIZEWE WINELIB_NAME_AW(IDC_SIZEWE) -#define IDC_SIZENSA MAKEINTRESOURCEA(32645) -#define IDC_SIZENSW MAKEINTRESOURCEW(32645) -#define IDC_SIZENS WINELIB_NAME_AW(IDC_SIZENS) -#define IDC_SIZEALLA MAKEINTRESOURCEA(32646) -#define IDC_SIZEALLW MAKEINTRESOURCEW(32646) -#define IDC_SIZEALL WINELIB_NAME_AW(IDC_SIZEALL) -#define IDC_NOA MAKEINTRESOURCEA(32648) -#define IDC_NOW MAKEINTRESOURCEW(32648) -#define IDC_NO WINELIB_NAME_AW(IDC_NO) -#define IDC_HANDA MAKEINTRESOURCEA(32649) -#define IDC_HANDW MAKEINTRESOURCEW(32649) -#define IDC_HAND WINELIB_NAME_AW(IDC_HAND) -#define IDC_APPSTARTINGA MAKEINTRESOURCEA(32650) -#define IDC_APPSTARTINGW MAKEINTRESOURCEW(32650) -#define IDC_APPSTARTING WINELIB_NAME_AW(IDC_APPSTARTING) -#define IDC_HELPA MAKEINTRESOURCEA(32651) -#define IDC_HELPW MAKEINTRESOURCEW(32651) -#define IDC_HELP WINELIB_NAME_AW(IDC_HELP) +#define IDC_ARROW MAKEINTRESOURCE(32512) +#define IDC_IBEAM MAKEINTRESOURCE(32513) +#define IDC_WAIT MAKEINTRESOURCE(32514) +#define IDC_CROSS MAKEINTRESOURCE(32515) +#define IDC_UPARROW MAKEINTRESOURCE(32516) +#define IDC_SIZE MAKEINTRESOURCE(32640) +#define IDC_ICON MAKEINTRESOURCE(32641) +#define IDC_SIZENWSE MAKEINTRESOURCE(32642) +#define IDC_SIZENESW MAKEINTRESOURCE(32643) +#define IDC_SIZEWE MAKEINTRESOURCE(32644) +#define IDC_SIZENS MAKEINTRESOURCE(32645) +#define IDC_SIZEALL MAKEINTRESOURCE(32646) +#define IDC_NO MAKEINTRESOURCE(32648) +#define IDC_HAND MAKEINTRESOURCE(32649) +#define IDC_APPSTARTING MAKEINTRESOURCE(32650) +#define IDC_HELP MAKEINTRESOURCE(32651) #define MNC_IGNORE 0 #define MNC_CLOSE 1 diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c index b7d98acb602..2dc3dce3882 100644 --- a/programs/winemenubuilder/winemenubuilder.c +++ b/programs/winemenubuilder/winemenubuilder.c @@ -214,7 +214,7 @@ static BOOL CALLBACK EnumResNameProc(HMODULE hModule, LPCSTR lpszType, LPSTR lps if (!sEnumRes->nIndex--) { - *sEnumRes->pResInfo = FindResourceA(hModule, lpszName, RT_GROUP_ICONA); + *sEnumRes->pResInfo = FindResourceA(hModule, lpszName, (LPSTR)RT_GROUP_ICON); return FALSE; } else @@ -242,7 +242,7 @@ static BOOL ExtractFromEXEDLL(const char *szFileName, int nIndex, const char *sz if (nIndex < 0) { - hResInfo = FindResourceA(hModule, MAKEINTRESOURCEA(-nIndex), RT_GROUP_ICONA); + hResInfo = FindResourceA(hModule, MAKEINTRESOURCEA(-nIndex), (LPSTR)RT_GROUP_ICON); WINE_ERR("FindResourceA (%s) called, return %p, error %ld\n", szFileName, hResInfo, GetLastError()); } else @@ -250,7 +250,7 @@ static BOOL ExtractFromEXEDLL(const char *szFileName, int nIndex, const char *sz hResInfo=NULL; sEnumRes.pResInfo = &hResInfo; sEnumRes.nIndex = nIndex; - EnumResourceNamesA(hModule, RT_GROUP_ICONA, &EnumResNameProc, (LONG) &sEnumRes); + EnumResourceNamesA(hModule, (LPSTR)RT_GROUP_ICON, &EnumResNameProc, (LONG) &sEnumRes); } if (!hResInfo) @@ -287,7 +287,7 @@ static BOOL ExtractFromEXEDLL(const char *szFileName, int nIndex, const char *sz FreeResource(hResData); - if (!(hResInfo = FindResourceA(hModule, lpName, RT_ICONA))) + if (!(hResInfo = FindResourceA(hModule, lpName, (LPSTR)RT_ICON))) { WINE_ERR("Second FindResourceA failed, error %ld\n", GetLastError()); goto error2; diff --git a/programs/winhelp/winhelp.c b/programs/winhelp/winhelp.c index 771447beaec..9b717af86e5 100644 --- a/programs/winhelp/winhelp.c +++ b/programs/winhelp/winhelp.c @@ -477,8 +477,8 @@ BOOL WINHELP_CreateHelpWindow(HLPFILE_PAGE* page, HLPFILE_WINDOWINFO* wi, win->hShadowWnd = 0; win->hHistoryWnd = 0; - win->hArrowCur = LoadCursorA(0, IDC_ARROWA); - win->hHandCur = LoadCursorA(0, IDC_HANDA); + win->hArrowCur = LoadCursorA(0, (LPSTR)IDC_ARROW); + win->hHandCur = LoadCursorA(0, (LPSTR)IDC_HAND); win->info = wi; diff --git a/windows/class.c b/windows/class.c index c4e74004556..05f6ee481e3 100644 --- a/windows/class.c +++ b/windows/class.c @@ -475,7 +475,7 @@ ATOM CLASS_RegisterBuiltinClass( const struct builtin_class_descr *descr ) return 0; } - classPtr->hCursor = LoadCursorA( 0, descr->cursor ); + classPtr->hCursor = LoadCursorA( 0, (LPSTR)descr->cursor ); classPtr->hbrBackground = descr->brush; if (descr->procA) WINPROC_SetProc( &classPtr->winprocA, descr->procA, diff --git a/windows/cursoricon.c b/windows/cursoricon.c index 488407da03a..fee18183f34 100644 --- a/windows/cursoricon.c +++ b/windows/cursoricon.c @@ -772,7 +772,7 @@ static HICON CURSORICON_Load(HINSTANCE hInstance, LPCWSTR name, /* Get directory resource ID */ if (!(hRsrc = FindResourceW( hInstance, name, - fCursor ? RT_GROUP_CURSORW : RT_GROUP_ICONW ))) + (LPWSTR)(fCursor ? RT_GROUP_CURSOR : RT_GROUP_ICON) ))) return 0; hGroupRsrc = hRsrc; @@ -794,7 +794,7 @@ static HICON CURSORICON_Load(HINSTANCE hInstance, LPCWSTR name, /* Load the resource */ if (!(hRsrc = FindResourceW(hInstance,MAKEINTRESOURCEW(wResId), - fCursor ? RT_CURSORW : RT_ICONW ))) return 0; + (LPWSTR)(fCursor ? RT_CURSOR : RT_ICON) ))) return 0; /* If shared icon, check whether it was already loaded */ if ( (loadflags & LR_SHARED) @@ -953,7 +953,7 @@ static HICON CURSORICON_ExtCopy(HICON hIcon, UINT nType, /* Get the Best Fit */ if (!(hRsrc = FindResourceW(pIconCache->hModule , - MAKEINTRESOURCEW(wResId), bIsIcon ? RT_ICONW : RT_CURSORW))) + MAKEINTRESOURCEW(wResId), (LPWSTR)(bIsIcon ? RT_ICON : RT_CURSOR)))) { return 0; } @@ -1478,10 +1478,10 @@ WORD WINAPI GetIconID16( HGLOBAL16 hResource, DWORD resType ) switch(resType) { - case RT_CURSOR16: + case RT_CURSOR: return (WORD)LookupIconIdFromDirectoryEx16( lpDir, FALSE, GetSystemMetrics(SM_CXCURSOR), GetSystemMetrics(SM_CYCURSOR), LR_MONOCHROME ); - case RT_ICON16: + case RT_ICON: return (WORD)LookupIconIdFromDirectoryEx16( lpDir, TRUE, GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON), 0 ); default: @@ -1943,7 +1943,7 @@ static HBITMAP BITMAP_Load( HINSTANCE instance,LPCWSTR name, UINT loadflags ) if (HIWORD(name)) return 0; if (!(instance = GetModuleHandleA("user32.dll"))) return 0; } - if (!(hRsrc = FindResourceW( instance, name, RT_BITMAPW ))) return 0; + if (!(hRsrc = FindResourceW( instance, name, (LPWSTR)RT_BITMAP ))) return 0; if (!(handle = LoadResource( instance, hRsrc ))) return 0; if ((info = (BITMAPINFO *)LockResource( handle )) == NULL) return 0; diff --git a/windows/defwnd.c b/windows/defwnd.c index be2864c49f6..e5a98c184ef 100644 --- a/windows/defwnd.c +++ b/windows/defwnd.c @@ -627,7 +627,7 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa for(len=1; len<64; len++) if((hIcon = LoadIconW(instance, MAKEINTRESOURCEW(len)))) return (LRESULT)hIcon; - return (LRESULT)LoadIconW(0, IDI_APPLICATIONW); + return (LRESULT)LoadIconW(0, (LPWSTR)IDI_APPLICATION); } break; diff --git a/windows/dialog.c b/windows/dialog.c index 3ce861e6b74..5abdc8ca2fb 100644 --- a/windows/dialog.c +++ b/windows/dialog.c @@ -101,7 +101,7 @@ const struct builtin_class_descr DIALOG_builtin_class = DefDlgProcA, /* procA */ DefDlgProcW, /* procW */ DLGWINDOWEXTRA, /* extra */ - IDC_ARROWA, /* cursor */ + IDC_ARROW, /* cursor */ 0 /* brush */ }; @@ -704,7 +704,7 @@ HWND WINAPI CreateDialogParamA( HINSTANCE hInst, LPCSTR name, HWND owner, HRSRC hrsrc; LPCDLGTEMPLATEA ptr; - if (!(hrsrc = FindResourceA( hInst, name, RT_DIALOGA ))) return 0; + if (!(hrsrc = FindResourceA( hInst, name, (LPSTR)RT_DIALOG ))) return 0; if (!(ptr = (LPCDLGTEMPLATEA)LoadResource(hInst, hrsrc))) return 0; return CreateDialogIndirectParamA( hInst, ptr, owner, dlgProc, param ); } @@ -719,7 +719,7 @@ HWND WINAPI CreateDialogParamW( HINSTANCE hInst, LPCWSTR name, HWND owner, HRSRC hrsrc; LPCDLGTEMPLATEA ptr; - if (!(hrsrc = FindResourceW( hInst, name, RT_DIALOGW ))) return 0; + if (!(hrsrc = FindResourceW( hInst, name, (LPWSTR)RT_DIALOG ))) return 0; if (!(ptr = (LPCDLGTEMPLATEW)LoadResource(hInst, hrsrc))) return 0; return CreateDialogIndirectParamW( hInst, ptr, owner, dlgProc, param ); } @@ -808,7 +808,7 @@ INT_PTR WINAPI DialogBoxParamA( HINSTANCE hInst, LPCSTR name, HRSRC hrsrc; LPCDLGTEMPLATEA ptr; - if (!(hrsrc = FindResourceA( hInst, name, RT_DIALOGA ))) return 0; + if (!(hrsrc = FindResourceA( hInst, name, (LPSTR)RT_DIALOG ))) return 0; if (!(ptr = (LPCDLGTEMPLATEA)LoadResource(hInst, hrsrc))) return 0; hwnd = DIALOG_CreateIndirect( hInst, ptr, owner, dlgProc, param, FALSE, TRUE ); if (hwnd) return DIALOG_DoDialogBox( hwnd, owner ); @@ -826,7 +826,7 @@ INT_PTR WINAPI DialogBoxParamW( HINSTANCE hInst, LPCWSTR name, HRSRC hrsrc; LPCDLGTEMPLATEW ptr; - if (!(hrsrc = FindResourceW( hInst, name, RT_DIALOGW ))) return 0; + if (!(hrsrc = FindResourceW( hInst, name, (LPWSTR)RT_DIALOG ))) return 0; if (!(ptr = (LPCDLGTEMPLATEW)LoadResource(hInst, hrsrc))) return 0; hwnd = DIALOG_CreateIndirect( hInst, ptr, owner, dlgProc, param, TRUE, TRUE ); if (hwnd) return DIALOG_DoDialogBox( hwnd, owner ); diff --git a/windows/mdi.c b/windows/mdi.c index 7622db1822d..a30a55854da 100644 --- a/windows/mdi.c +++ b/windows/mdi.c @@ -186,7 +186,7 @@ const struct builtin_class_descr MDICLIENT_builtin_class = MDIClientWndProcA, /* procA */ MDIClientWndProcW, /* procW */ sizeof(MDICLIENTINFO), /* extra */ - IDC_ARROWA, /* cursor */ + IDC_ARROW, /* cursor */ (HBRUSH)(COLOR_APPWORKSPACE+1) /* brush */ }; @@ -2208,7 +2208,7 @@ static HWND MDI_MoreWindowsDialog(HWND hwnd) HRSRC hRes; HANDLE hDlgTmpl; - hRes = FindResourceA(GetModuleHandleA("USER32"), "MDI_MOREWINDOWS", RT_DIALOGA); + hRes = FindResourceA(GetModuleHandleA("USER32"), "MDI_MOREWINDOWS", (LPSTR)RT_DIALOG); if (hRes == 0) return 0; diff --git a/windows/msgbox.c b/windows/msgbox.c index 54eb7404deb..f0b17418de9 100644 --- a/windows/msgbox.c +++ b/windows/msgbox.c @@ -124,19 +124,19 @@ static HFONT MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSW lpmb) switch(lpmb->dwStyle & MB_ICONMASK) { case MB_ICONEXCLAMATION: SendDlgItemMessageW(hwnd, stc1, STM_SETICON, - (WPARAM)LoadIconW(0, IDI_EXCLAMATIONW), 0); + (WPARAM)LoadIconW(0, (LPWSTR)IDI_EXCLAMATION), 0); break; case MB_ICONQUESTION: SendDlgItemMessageW(hwnd, stc1, STM_SETICON, - (WPARAM)LoadIconW(0, IDI_QUESTIONW), 0); + (WPARAM)LoadIconW(0, (LPWSTR)IDI_QUESTION), 0); break; case MB_ICONASTERISK: SendDlgItemMessageW(hwnd, stc1, STM_SETICON, - (WPARAM)LoadIconW(0, IDI_ASTERISKW), 0); + (WPARAM)LoadIconW(0, (LPWSTR)IDI_ASTERISK), 0); break; case MB_ICONHAND: SendDlgItemMessageW(hwnd, stc1, STM_SETICON, - (WPARAM)LoadIconW(0, IDI_HANDW), 0); + (WPARAM)LoadIconW(0, (LPWSTR)IDI_HAND), 0); break; case MB_USERICON: SendDlgItemMessageW(hwnd, stc1, STM_SETICON, @@ -448,7 +448,7 @@ INT WINAPI MessageBoxIndirectW( LPMSGBOXPARAMSW msgbox ) static const WCHAR msg_box_res_nameW[] = { 'M','S','G','B','O','X',0 }; hUser32 = GetModuleHandleW(user32_res_nameW); - if (!(hRes = FindResourceExW(hUser32, RT_DIALOGW, msg_box_res_nameW, msgbox->dwLanguageId))) + if (!(hRes = FindResourceExW(hUser32, (LPWSTR)RT_DIALOG, msg_box_res_nameW, msgbox->dwLanguageId))) return 0; if (!(tmplate = (LPVOID)LoadResource(hUser32, hRes))) return 0; diff --git a/windows/nonclient.c b/windows/nonclient.c index cc9ee27370c..8b45a7e4acd 100644 --- a/windows/nonclient.c +++ b/windows/nonclient.c @@ -248,7 +248,7 @@ static HICON NC_IconForWindow( HWND hwnd ) * get the default one. */ if (!hIcon && (GetWindowLongA( hwnd, GWL_STYLE ) & DS_MODALFRAME)) - hIcon = LoadImageA(0, IDI_WINLOGOA, IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR); + hIcon = LoadImageA(0, (LPSTR)IDI_WINLOGO, IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR); return hIcon; } @@ -1739,23 +1739,23 @@ LONG NC_HandleSetCursor( HWND hwnd, WPARAM wParam, LPARAM lParam ) case HTLEFT: case HTRIGHT: - return (LONG)SetCursor( LoadCursorA( 0, IDC_SIZEWEA ) ); + return (LONG)SetCursor( LoadCursorA( 0, (LPSTR)IDC_SIZEWE ) ); case HTTOP: case HTBOTTOM: - return (LONG)SetCursor( LoadCursorA( 0, IDC_SIZENSA ) ); + return (LONG)SetCursor( LoadCursorA( 0, (LPSTR)IDC_SIZENS ) ); case HTTOPLEFT: case HTBOTTOMRIGHT: - return (LONG)SetCursor( LoadCursorA( 0, IDC_SIZENWSEA ) ); + return (LONG)SetCursor( LoadCursorA( 0, (LPSTR)IDC_SIZENWSE ) ); case HTTOPRIGHT: case HTBOTTOMLEFT: - return (LONG)SetCursor( LoadCursorA( 0, IDC_SIZENESWA ) ); + return (LONG)SetCursor( LoadCursorA( 0, (LPSTR)IDC_SIZENESW ) ); } /* Default cursor: arrow */ - return (LONG)SetCursor( LoadCursorA( 0, IDC_ARROWA ) ); + return (LONG)SetCursor( LoadCursorA( 0, (LPSTR)IDC_ARROW ) ); } /***********************************************************************