From bfe88a00f8300a301acc291d50f1894dec47a6ef Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 1 Nov 2007 12:55:00 +0100 Subject: [PATCH] user32: Store the builtin class names in Unicode. --- dlls/user32/button.c | 3 ++- dlls/user32/class.c | 2 +- dlls/user32/combo.c | 3 ++- dlls/user32/controls.h | 2 +- dlls/user32/desktop.c | 2 +- dlls/user32/dialog.c | 2 +- dlls/user32/edit.c | 3 ++- dlls/user32/icontitle.c | 2 +- dlls/user32/listbox.c | 6 ++++-- dlls/user32/mdi.c | 3 ++- dlls/user32/menu.c | 2 +- dlls/user32/scroll.c | 3 ++- dlls/user32/static.c | 3 ++- 13 files changed, 22 insertions(+), 14 deletions(-) diff --git a/dlls/user32/button.c b/dlls/user32/button.c index b80d78aee00..46940f00c89 100644 --- a/dlls/user32/button.c +++ b/dlls/user32/button.c @@ -159,9 +159,10 @@ static WORD checkBoxWidth = 0, checkBoxHeight = 0; /********************************************************************* * button class descriptor */ +static const WCHAR buttonW[] = {'B','u','t','t','o','n',0}; const struct builtin_class_descr BUTTON_builtin_class = { - "Button", /* name */ + buttonW, /* name */ CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC, /* style */ ButtonWndProcA, /* procA */ ButtonWndProcW, /* procW */ diff --git a/dlls/user32/class.c b/dlls/user32/class.c index a0be005efb8..0f2e8a83f93 100644 --- a/dlls/user32/class.c +++ b/dlls/user32/class.c @@ -371,7 +371,7 @@ static WNDPROC register_builtin( const struct builtin_class_descr *descr ) ATOM atom; CLASS *classPtr; - if (!(atom = GlobalAddAtomA( descr->name ))) return 0; + if (!(atom = GlobalAddAtomW( descr->name ))) return 0; if (!(classPtr = CLASS_RegisterClass( atom, user32_module, FALSE, descr->style, 0, descr->extra ))) return 0; diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c index 1e801a3991e..42792977253 100644 --- a/dlls/user32/combo.c +++ b/dlls/user32/combo.c @@ -93,9 +93,10 @@ static LRESULT WINAPI ComboWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM /********************************************************************* * combo class descriptor */ +static const WCHAR comboboxW[] = {'C','o','m','b','o','B','o','x',0}; const struct builtin_class_descr COMBO_builtin_class = { - "ComboBox", /* name */ + comboboxW, /* name */ CS_PARENTDC | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW, /* style */ ComboWndProcA, /* procA */ ComboWndProcW, /* procW */ diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h index 594b665073f..d52c9146362 100644 --- a/dlls/user32/controls.h +++ b/dlls/user32/controls.h @@ -34,7 +34,7 @@ /* Built-in class descriptor */ struct builtin_class_descr { - LPCSTR name; /* class name */ + LPCWSTR name; /* class name */ UINT style; /* class style */ WNDPROC procA; /* ASCII window procedure */ WNDPROC procW; /* Unicode window procedure */ diff --git a/dlls/user32/desktop.c b/dlls/user32/desktop.c index 37774b8b243..ad4740b86b9 100644 --- a/dlls/user32/desktop.c +++ b/dlls/user32/desktop.c @@ -46,7 +46,7 @@ static LRESULT WINAPI DesktopWndProc( HWND hwnd, UINT message, WPARAM wParam, LP */ const struct builtin_class_descr DESKTOP_builtin_class = { - (LPCSTR)DESKTOP_CLASS_ATOM, /* name */ + (LPCWSTR)DESKTOP_CLASS_ATOM, /* name */ CS_DBLCLKS, /* style */ NULL, /* procA (winproc is Unicode only) */ DesktopWndProc, /* procW */ diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c index d8cf63bb2a2..40ac35b53d0 100644 --- a/dlls/user32/dialog.c +++ b/dlls/user32/dialog.c @@ -95,7 +95,7 @@ typedef struct */ const struct builtin_class_descr DIALOG_builtin_class = { - (LPCSTR)DIALOG_CLASS_ATOM, /* name */ + (LPCWSTR)DIALOG_CLASS_ATOM, /* name */ CS_SAVEBITS | CS_DBLCLKS, /* style */ DefDlgProcA, /* procA */ DefDlgProcW, /* procW */ diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index ee7e7a4bf83..958f4fee390 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -294,9 +294,10 @@ LRESULT WINAPI EditWndProcW(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); /********************************************************************* * edit class descriptor */ +static const WCHAR editW[] = {'E','d','i','t',0}; const struct builtin_class_descr EDIT_builtin_class = { - "Edit", /* name */ + editW, /* name */ CS_DBLCLKS | CS_PARENTDC, /* style */ EditWndProcA, /* procA */ EditWndProcW, /* procW */ diff --git a/dlls/user32/icontitle.c b/dlls/user32/icontitle.c index 7a185c0ba0b..d6995badb6e 100644 --- a/dlls/user32/icontitle.c +++ b/dlls/user32/icontitle.c @@ -45,7 +45,7 @@ static LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPAR */ const struct builtin_class_descr ICONTITLE_builtin_class = { - (LPCSTR)ICONTITLE_CLASS_ATOM, /* name */ + (LPCWSTR)ICONTITLE_CLASS_ATOM, /* name */ 0, /* style */ NULL, /* procA (winproc is Unicode only) */ IconTitleWndProc, /* procW */ diff --git a/dlls/user32/listbox.c b/dlls/user32/listbox.c index 0a39582b6fe..7ec97dd6e91 100644 --- a/dlls/user32/listbox.c +++ b/dlls/user32/listbox.c @@ -136,9 +136,10 @@ static LRESULT LISTBOX_GetItemRect( LB_DESCR *descr, INT index, RECT *rect ); /********************************************************************* * listbox class descriptor */ +static const WCHAR listboxW[] = {'L','i','s','t','B','o','x',0}; const struct builtin_class_descr LISTBOX_builtin_class = { - "ListBox", /* name */ + listboxW, /* name */ CS_DBLCLKS /*| CS_PARENTDC*/, /* style */ ListBoxWndProcA, /* procA */ ListBoxWndProcW, /* procW */ @@ -151,9 +152,10 @@ const struct builtin_class_descr LISTBOX_builtin_class = /********************************************************************* * combolbox class descriptor */ +static const WCHAR combolboxW[] = {'C','o','m','b','o','L','B','o','x',0}; const struct builtin_class_descr COMBOLBOX_builtin_class = { - "ComboLBox", /* name */ + combolboxW, /* name */ CS_DBLCLKS | CS_SAVEBITS, /* style */ ListBoxWndProcA, /* procA */ ListBoxWndProcW, /* procW */ diff --git a/dlls/user32/mdi.c b/dlls/user32/mdi.c index 1fc2fbd2a54..bad5519285d 100644 --- a/dlls/user32/mdi.c +++ b/dlls/user32/mdi.c @@ -184,9 +184,10 @@ static void MDI_PostUpdate(HWND hwnd, MDICLIENTINFO* ci, WORD recalc) /********************************************************************* * MDIClient class descriptor */ +static const WCHAR mdiclientW[] = {'M','D','I','C','l','i','e','n','t',0}; const struct builtin_class_descr MDICLIENT_builtin_class = { - "MDIClient", /* name */ + mdiclientW, /* name */ 0, /* style */ MDIClientWndProcA, /* procA */ MDIClientWndProcW, /* procW */ diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c index 3a7500588fc..8e9a6311f95 100644 --- a/dlls/user32/menu.c +++ b/dlls/user32/menu.c @@ -189,7 +189,7 @@ DWORD WINAPI DrawMenuBarTemp(HWND hwnd, HDC hDC, LPRECT lprect, HMENU hMenu, HFO */ const struct builtin_class_descr MENU_builtin_class = { - (LPCSTR)POPUPMENU_CLASS_ATOM, /* name */ + (LPCWSTR)POPUPMENU_CLASS_ATOM, /* name */ CS_DROPSHADOW | CS_SAVEBITS | CS_DBLCLKS, /* style */ NULL, /* procA (winproc is Unicode only) */ PopupMenuWndProc, /* procW */ diff --git a/dlls/user32/scroll.c b/dlls/user32/scroll.c index afd961e38d2..ec2fe136b32 100644 --- a/dlls/user32/scroll.c +++ b/dlls/user32/scroll.c @@ -114,9 +114,10 @@ static LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPA /********************************************************************* * scrollbar class descriptor */ +static const WCHAR scrollbarW[] = {'S','c','r','o','l','l','B','a','r',0}; const struct builtin_class_descr SCROLL_builtin_class = { - "ScrollBar", /* name */ + scrollbarW, /* name */ CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC, /* style */ NULL, /* procA (winproc is Unicode only) */ ScrollBarWndProc, /* procW */ diff --git a/dlls/user32/static.c b/dlls/user32/static.c index bb6abfb0524..df198754130 100644 --- a/dlls/user32/static.c +++ b/dlls/user32/static.c @@ -100,9 +100,10 @@ static const pfPaint staticPaintFunc[SS_TYPEMASK+1] = /********************************************************************* * static class descriptor */ +static const WCHAR staticW[] = {'S','t','a','t','i','c',0}; const struct builtin_class_descr STATIC_builtin_class = { - "Static", /* name */ + staticW, /* name */ CS_DBLCLKS | CS_PARENTDC, /* style */ StaticWndProcA, /* procA */ StaticWndProcW, /* procW */