Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/comctl32/combo.c | 22 ++++++---------------- dlls/comctl32/comboex.c | 16 ++++++---------- dlls/comctl32/commctrl.c | 6 ++---- dlls/comctl32/datetime.c | 2 +- dlls/comctl32/edit.c | 9 +++------ dlls/comctl32/listbox.c | 12 ++++-------- dlls/comctl32/listview.c | 2 +- dlls/comctl32/progress.c | 2 +- dlls/comctl32/status.c | 2 +- dlls/comctl32/taskdialog.c | 5 ++--- dlls/comctl32/theme_dialog.c | 2 +- dlls/comctl32/theming.c | 10 +++------- dlls/comctl32/toolbar.c | 2 +- dlls/comctl32/trackbar.c | 5 ++--- dlls/comctl32/treeview.c | 2 +- dlls/comctl32/updown.c | 9 +++------ 16 files changed, 38 insertions(+), 70 deletions(-)
diff --git a/dlls/comctl32/combo.c b/dlls/comctl32/combo.c index 765fc631e0c..572740b5cfd 100644 --- a/dlls/comctl32/combo.c +++ b/dlls/comctl32/combo.c @@ -400,9 +400,6 @@ static void CBGetDroppedControlRect( LPHEADCOMBO lphc, LPRECT lpRect) */ static LRESULT COMBO_Create( HWND hwnd, LPHEADCOMBO lphc, HWND hwndParent, LONG style ) { - static const WCHAR clbName[] = {'C','o','m','b','o','L','B','o','x',0}; - static const WCHAR editName[] = {'E','d','i','t',0}; - OpenThemeData( hwnd, WC_COMBOBOXW ); if( !CB_GETTYPE(lphc) ) lphc->dwStyle |= CBS_SIMPLE; if( CB_GETTYPE(lphc) != CBS_DROPDOWNLIST ) lphc->wState |= CBF_EDIT; @@ -488,7 +485,7 @@ static LRESULT COMBO_Create( HWND hwnd, LPHEADCOMBO lphc, HWND hwndParent, LONG lbeExStyle |= (WS_EX_TOPMOST | WS_EX_TOOLWINDOW); }
- lphc->hWndLBox = CreateWindowExW(lbeExStyle, clbName, NULL, lbeStyle, + lphc->hWndLBox = CreateWindowExW(lbeExStyle, L"ComboLBox", NULL, lbeStyle, lphc->droppedRect.left, lphc->droppedRect.top, lphc->droppedRect.right - lphc->droppedRect.left, lphc->droppedRect.bottom - lphc->droppedRect.top, hwnd, (HMENU)ID_CB_LISTBOX, (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE ), lphc ); @@ -510,7 +507,7 @@ static LRESULT COMBO_Create( HWND hwnd, LPHEADCOMBO lphc, HWND hwndParent, LONG
if (!IsWindowEnabled(hwnd)) lbeStyle |= WS_DISABLED;
- lphc->hWndEdit = CreateWindowExW(0, editName, NULL, lbeStyle, + lphc->hWndEdit = CreateWindowExW(0, WC_EDITW, NULL, lbeStyle, lphc->textRect.left, lphc->textRect.top, lphc->textRect.right - lphc->textRect.left, lphc->textRect.bottom - lphc->textRect.top, @@ -648,8 +645,7 @@ static void CBPaintText(HEADCOMBO *lphc, HDC hdc_paint)
if( lphc->wState & CBF_EDIT ) { - static const WCHAR empty_stringW[] = { 0 }; - if( CB_HASSTRINGS(lphc) ) SetWindowTextW( lphc->hWndEdit, pText ? pText : empty_stringW ); + if( CB_HASSTRINGS(lphc) ) SetWindowTextW( lphc->hWndEdit, pText ? pText : L"" ); if( lphc->wState & CBF_FOCUSED ) SendMessageW(lphc->hWndEdit, EM_SETSEL, 0, MAXLONG); } @@ -705,8 +701,6 @@ static void CBPaintText(HEADCOMBO *lphc, HDC hdc_paint) } else { - static const WCHAR empty_stringW[] = { 0 }; - if ( (lphc->wState & CBF_FOCUSED) && !(lphc->wState & CBF_DROPPED) ) {
@@ -721,7 +715,7 @@ static void CBPaintText(HEADCOMBO *lphc, HDC hdc_paint) rectEdit.top + 1, ETO_OPAQUE | ETO_CLIPPED, &rectEdit, - pText ? pText : empty_stringW , size, NULL ); + pText ? pText : L"" , size, NULL );
if(lphc->wState & CBF_FOCUSED && !(lphc->wState & CBF_DROPPED)) DrawFocusRect( hdc, &rectEdit ); @@ -886,7 +880,6 @@ static void CBUpdateEdit( LPHEADCOMBO lphc , INT index ) { INT length; LPWSTR pText = NULL; - static const WCHAR empty_stringW[] = { 0 };
TRACE("\t %i\n", index );
@@ -903,7 +896,7 @@ static void CBUpdateEdit( LPHEADCOMBO lphc , INT index ) if( CB_HASSTRINGS(lphc) ) { lphc->wState |= (CBF_NOEDITNOTIFY | CBF_NOLBSELECT); - SendMessageW(lphc->hWndEdit, WM_SETTEXT, 0, pText ? (LPARAM)pText : (LPARAM)empty_stringW); + SendMessageW(lphc->hWndEdit, WM_SETTEXT, 0, pText ? (LPARAM)pText : (LPARAM)L""); lphc->wState &= ~(CBF_NOEDITNOTIFY | CBF_NOLBSELECT); }
@@ -1959,10 +1952,7 @@ static LRESULT CALLBACK COMBO_WindowProc( HWND hwnd, UINT message, WPARAM wParam SendMessageW(lphc->hWndLBox, LB_RESETCONTENT, 0, 0);
if ((lphc->wState & CBF_EDIT) && CB_HASSTRINGS(lphc)) - { - static const WCHAR empty_stringW[] = { 0 }; - SendMessageW(lphc->hWndEdit, WM_SETTEXT, 0, (LPARAM)empty_stringW); - } + SendMessageW(lphc->hWndEdit, WM_SETTEXT, 0, (LPARAM)L""); else InvalidateRect(lphc->self, NULL, TRUE); return TRUE; diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c index 61b63831361..0f7e46949e4 100644 --- a/dlls/comctl32/comboex.c +++ b/dlls/comctl32/comboex.c @@ -327,14 +327,13 @@ static LPCWSTR COMBOEX_GetText(const COMBOEX_INFO *infoPtr, CBE_ITEMDATA *item)
static void COMBOEX_GetComboFontSize (const COMBOEX_INFO *infoPtr, SIZE *size) { - static const WCHAR strA[] = { 'A', 0 }; HFONT nfont, ofont; HDC mydc;
mydc = GetDC (0); /* why the entire screen???? */ nfont = (HFONT)SendMessageW (infoPtr->hwndCombo, WM_GETFONT, 0, 0); ofont = SelectObject (mydc, nfont); - GetTextExtentPointW (mydc, strA, 1, size); + GetTextExtentPointW (mydc, L"A", 1, size); SelectObject (mydc, ofont); ReleaseDC (0, mydc); TRACE("selected font hwnd=%p, height=%d\n", nfont, size->cy); @@ -948,7 +947,6 @@ static INT COMBOEX_SetItemHeight (COMBOEX_INFO const *infoPtr, INT index, UINT h
static LRESULT COMBOEX_Create (HWND hwnd, CREATESTRUCTA const *cs) { - static const WCHAR NIL[] = { 0 }; COMBOEX_INFO *infoPtr; LOGFONTW mylogfont; RECT win_rect; @@ -991,7 +989,7 @@ static LRESULT COMBOEX_Create (HWND hwnd, CREATESTRUCTA const *cs) /* We also need to place the edit control at the proper location */ /* (allow space for the icons). */
- infoPtr->hwndCombo = CreateWindowW (WC_COMBOBOXW, NIL, + infoPtr->hwndCombo = CreateWindowW (WC_COMBOBOXW, L"", WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_VSCROLL | CBS_NOINTEGRALHEIGHT | CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | CBS_OWNERDRAWFIXED | @@ -1009,7 +1007,7 @@ static LRESULT COMBOEX_Create (HWND hwnd, CREATESTRUCTA const *cs) * It is created only for CBS_DROPDOWN style */ if ((cs->style & CBS_DROPDOWNLIST) == CBS_DROPDOWN) { - infoPtr->hwndEdit = CreateWindowExW (0, WC_EDITW, NIL, + infoPtr->hwndEdit = CreateWindowExW (0, WC_EDITW, L"", WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | ES_AUTOHSCROLL, 0, 0, 0, 0, /* will set later */ infoPtr->hwndCombo, @@ -1257,11 +1255,10 @@ static BOOL COMBOEX_WM_DeleteItem (COMBOEX_INFO *infoPtr, DELETEITEMSTRUCT const
static LRESULT COMBOEX_DrawItem (COMBOEX_INFO *infoPtr, DRAWITEMSTRUCT const *dis) { - static const WCHAR nil[] = { 0 }; CBE_ITEMDATA *item = NULL; SIZE txtsize; RECT rect; - LPCWSTR str = nil; + LPCWSTR str = L""; UINT xbase, x, y; INT len; COLORREF nbkc, ntxc, bkc, txc; @@ -1399,7 +1396,7 @@ static LRESULT COMBOEX_DrawItem (COMBOEX_INFO *infoPtr, DRAWITEMSTRUCT const *di
/* setup pointer to text to be drawn */ str = COMBOEX_GetText(infoPtr, item); - if (!str) str = nil; + if (!str) str = L"";
len = lstrlenW (str); GetTextExtentPoint32W (dis->hDC, str, len, &txtsize); @@ -1537,12 +1534,11 @@ static LRESULT COMBOEX_Enable (COMBOEX_INFO *infoPtr, BOOL enable)
static LRESULT COMBOEX_MeasureItem (COMBOEX_INFO const *infoPtr, MEASUREITEMSTRUCT *mis) { - static const WCHAR strW[] = { 'W', 0 }; SIZE mysize; HDC hdc;
hdc = GetDC (0); - GetTextExtentPointW (hdc, strW, 1, &mysize); + GetTextExtentPointW (hdc, L"W", 1, &mysize); ReleaseDC (0, hdc); mis->itemHeight = mysize.cy + CBE_EXTRA;
diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index 744188a64a1..6056c0e6cf9 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c @@ -93,9 +93,7 @@ static const WORD wPattern55AA[] = 0x5555, 0xaaaa, 0x5555, 0xaaaa };
-static const WCHAR strCC32SubclassInfo[] = { - 'C','C','3','2','S','u','b','c','l','a','s','s','I','n','f','o',0 -}; +static const WCHAR strCC32SubclassInfo[] = L"CC32SubclassInfo";
static void unregister_versioned_classes(void) { @@ -1738,7 +1736,7 @@ HRESULT WINAPI LoadIconMetric(HINSTANCE hinst, const WCHAR *name, int size, HICO return LoadIconWithScaleDown(hinst, name, cx, cy, icon); }
-static const WCHAR strMRUList[] = { 'M','R','U','L','i','s','t',0 }; +static const WCHAR strMRUList[] = L"MRUList";
/************************************************************************** * Alloc [COMCTL32.71] diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c index 8c403dde136..71bb3d238b0 100644 --- a/dlls/comctl32/datetime.c +++ b/dlls/comctl32/datetime.c @@ -126,7 +126,7 @@ extern int MONTHCAL_CalculateDayOfWeek(SYSTEMTIME *date, BOOL inplace);
static BOOL DATETIME_SendSimpleNotify (const DATETIME_INFO *infoPtr, UINT code); static BOOL DATETIME_SendDateTimeChangeNotify (const DATETIME_INFO *infoPtr); -static const WCHAR allowedformatchars[] = {'d', 'h', 'H', 'm', 'M', 's', 't', 'y', 'X', 0}; +static const WCHAR allowedformatchars[] = L"dhHmMstyX"; static const int maxrepetition [] = {4,2,2,2,4,2,2,4,-1};
/* valid date limits */ diff --git a/dlls/comctl32/edit.c b/dlls/comctl32/edit.c index 4861fd7a9c7..f84ef1eb168 100644 --- a/dlls/comctl32/edit.c +++ b/dlls/comctl32/edit.c @@ -3031,19 +3031,16 @@ static LRESULT EDIT_WM_Char(EDITSTATE *es, WCHAR c) if (es->style & ES_READONLY) { EDIT_MoveHome(es, FALSE, FALSE); EDIT_MoveDown_ML(es, FALSE); - } else { - static const WCHAR cr_lfW[] = {'\r','\n'}; - EDIT_EM_ReplaceSel(es, TRUE, cr_lfW, 2, TRUE, TRUE); - } + } else + EDIT_EM_ReplaceSel(es, TRUE, L"\r\n", 2, TRUE, TRUE); } break; case '\t': if ((es->style & ES_MULTILINE) && !(es->style & ES_READONLY)) { - static const WCHAR tabW[] = {'\t'}; if (EDIT_IsInsideDialog(es)) break; - EDIT_EM_ReplaceSel(es, TRUE, tabW, 1, TRUE, TRUE); + EDIT_EM_ReplaceSel(es, TRUE, L"\t", 1, TRUE, TRUE); } break; case VK_BACK: diff --git a/dlls/comctl32/listbox.c b/dlls/comctl32/listbox.c index f9b4e0aeafe..e6c4b2d6d24 100644 --- a/dlls/comctl32/listbox.c +++ b/dlls/comctl32/listbox.c @@ -1690,8 +1690,7 @@ static LRESULT LISTBOX_InsertString( LB_DESCR *descr, INT index, LPCWSTR str )
if (HAS_STRINGS(descr)) { - static const WCHAR empty_stringW[] = { 0 }; - if (!str) str = empty_stringW; + if (!str) str = L""; if (!(new_str = HeapAlloc( GetProcessHeap(), 0, (lstrlenW(str) + 1) * sizeof(WCHAR) ))) { SEND_NOTIFICATION( descr, LBN_ERRSPACE ); @@ -1881,16 +1880,14 @@ static LRESULT LISTBOX_Directory( LB_DESCR *descr, UINT attrib, WCHAR buffer[270]; if (entry.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - static const WCHAR bracketW[] = { ']',0 }; - static const WCHAR dotW[] = { '.',0 }; if (!(attrib & DDL_DIRECTORY) || - !lstrcmpW( entry.cFileName, dotW )) continue; + !lstrcmpW( entry.cFileName, L"." )) continue; buffer[0] = '['; if (!long_names && entry.cAlternateFileName[0]) lstrcpyW( buffer + 1, entry.cAlternateFileName ); else lstrcpyW( buffer + 1, entry.cFileName ); - lstrcatW(buffer, bracketW); + lstrcatW(buffer, L"]"); } else /* not a directory */ { @@ -3164,7 +3161,6 @@ void LISTBOX_Register(void)
void COMBOLBOX_Register(void) { - static const WCHAR combolboxW[] = {'C','o','m','b','o','L','B','o','x',0}; WNDCLASSW wndClass;
memset(&wndClass, 0, sizeof(wndClass)); @@ -3174,6 +3170,6 @@ void COMBOLBOX_Register(void) wndClass.cbWndExtra = sizeof(LB_DESCR *); wndClass.hCursor = LoadCursorW(0, (LPWSTR)IDC_ARROW); wndClass.hbrBackground = NULL; - wndClass.lpszClassName = combolboxW; + wndClass.lpszClassName = L"ComboLBox"; RegisterClassW(&wndClass); } diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index e31c787c4a4..8e5d6ed4d56 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -422,7 +422,7 @@ typedef struct tagLISTVIEW_INFO TRACE("hwndSelf=%p, rcList=%s\n", iP->hwndSelf, wine_dbgstr_rect(&iP->rcList)); \ } while(0)
-static const WCHAR themeClass[] = {'L','i','s','t','V','i','e','w',0}; +static const WCHAR themeClass[] = L"ListView";
/* * forward declarations diff --git a/dlls/comctl32/progress.c b/dlls/comctl32/progress.c index 268bdac5da2..5cf2ccda20f 100644 --- a/dlls/comctl32/progress.c +++ b/dlls/comctl32/progress.c @@ -529,7 +529,7 @@ static LRESULT WINAPI ProgressWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { PROGRESS_INFO *infoPtr; - static const WCHAR themeClass[] = {'P','r','o','g','r','e','s','s',0}; + static const WCHAR themeClass[] = L"Progress"; HTHEME theme;
TRACE("hwnd=%p msg=%04x wparam=%lx lParam=%lx\n", hwnd, message, wParam, lParam); diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c index f76f6262cc0..b0cc3377986 100644 --- a/dlls/comctl32/status.c +++ b/dlls/comctl32/status.c @@ -86,7 +86,7 @@ typedef struct #define VERT_BORDER 2 #define HORZ_GAP 2
-static const WCHAR themeClass[] = { 'S','t','a','t','u','s',0 }; +static const WCHAR themeClass[] = L"Status";
/* prototype */ static void diff --git a/dlls/comctl32/taskdialog.c b/dlls/comctl32/taskdialog.c index 3d98c644e84..92a2b533efb 100644 --- a/dlls/comctl32/taskdialog.c +++ b/dlls/comctl32/taskdialog.c @@ -145,7 +145,6 @@ static DLGTEMPLATE *create_taskdialog_template(const TASKDIALOGCONFIG *taskconfi { unsigned int size, title_size; static const WORD fontsize = 0x7fff; - static const WCHAR emptyW[] = { 0 }; const WCHAR *titleW = NULL; DLGTEMPLATE *template; WCHAR pathW[MAX_PATH]; @@ -162,7 +161,7 @@ static DLGTEMPLATE *create_taskdialog_template(const TASKDIALOGCONFIG *taskconfi else titleW = taskconfig->pszWindowTitle; if (!titleW) - titleW = emptyW; + titleW = L""; title_size = (lstrlenW(titleW) + 1) * sizeof(WCHAR);
size = sizeof(DLGTEMPLATE) + 2 * sizeof(WORD); @@ -1205,7 +1204,7 @@ static void taskdialog_destroy(struct taskdialog_info *dialog_info)
static INT_PTR CALLBACK taskdialog_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - static const WCHAR taskdialog_info_propnameW[] = {'T','a','s','k','D','i','a','l','o','g','I','n','f','o',0}; + static const WCHAR taskdialog_info_propnameW[] = L"TaskDialogInfo"; struct taskdialog_info *dialog_info; LRESULT result;
diff --git a/dlls/comctl32/theme_dialog.c b/dlls/comctl32/theme_dialog.c index 656e52dbf57..29007ba5c60 100644 --- a/dlls/comctl32/theme_dialog.c +++ b/dlls/comctl32/theme_dialog.c @@ -40,7 +40,7 @@ LRESULT CALLBACK THEMING_DialogSubclassProc (HWND hWnd, UINT msg, ULONG_PTR dwRefData) { HTHEME theme = GetWindowTheme ( hWnd ); - static const WCHAR themeClass[] = { 'W','i','n','d','o','w',0 }; + static const WCHAR themeClass[] = L"Window"; BOOL themingActive = IsThemeDialogTextureEnabled (hWnd); BOOL doTheming = themingActive && (theme != NULL); LRESULT result; diff --git a/dlls/comctl32/theming.c b/dlls/comctl32/theming.c index 759ab768995..ed7bb0a5b33 100644 --- a/dlls/comctl32/theming.c +++ b/dlls/comctl32/theming.c @@ -39,7 +39,7 @@ extern LRESULT CALLBACK THEMING_DialogSubclassProc (HWND, UINT, WPARAM, LPARAM, extern LRESULT CALLBACK THEMING_ScrollbarSubclassProc (HWND, UINT, WPARAM, LPARAM, ULONG_PTR) DECLSPEC_HIDDEN;
-static const WCHAR dialogClass[] = {'#','3','2','7','7','0',0}; +static const WCHAR dialogClass[] = L"#32770";
static const struct ThemingSubclass { @@ -95,15 +95,11 @@ static const WNDPROC subclassProcs[NUM_SUBCLASSES] = { void THEMING_Initialize (void) { unsigned int i; - static const WCHAR subclassPropName[] = - { 'C','C','3','2','T','h','e','m','i','n','g','S','u','b','C','l',0 }; - static const WCHAR refDataPropName[] = - { 'C','C','3','2','T','h','e','m','i','n','g','D','a','t','a',0 };
if (!IsThemeActive()) return;
- atSubclassProp = GlobalAddAtomW (subclassPropName); - atRefDataProp = GlobalAddAtomW (refDataPropName); + atSubclassProp = GlobalAddAtomW (L"CC32ThemingSubCl"); + atRefDataProp = GlobalAddAtomW (L"CC32ThemingData");
for (i = 0; i < NUM_SUBCLASSES; i++) { diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index c9ea56c0782..248541aab2e 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -232,7 +232,7 @@ typedef enum #define GETHOTIMAGELIST(infoPtr, id) TOOLBAR_GetImageList(infoPtr->himlHot, infoPtr->cimlHot, id) #define GETDISIMAGELIST(infoPtr, id) TOOLBAR_GetImageList(infoPtr->himlDis, infoPtr->cimlDis, id)
-static const WCHAR themeClass[] = { 'T','o','o','l','b','a','r',0 }; +static const WCHAR themeClass[] = L"Toolbar";
static BOOL TOOLBAR_GetButtonInfo(const TOOLBAR_INFO *infoPtr, NMTOOLBARW *nmtb); static BOOL TOOLBAR_IsButtonRemovable(const TOOLBAR_INFO *infoPtr, int iItem, const CUSTOMBUTTON *btnInfo); diff --git a/dlls/comctl32/trackbar.c b/dlls/comctl32/trackbar.c index de3f93e8eb9..e71edc3b882 100644 --- a/dlls/comctl32/trackbar.c +++ b/dlls/comctl32/trackbar.c @@ -97,7 +97,7 @@ typedef struct #define TIC_SELECTIONMARKMIN 0x100 #define TIC_SELECTIONMARK (TIC_SELECTIONMARKMAX | TIC_SELECTIONMARKMIN)
-static const WCHAR themeClass[] = { 'T','r','a','c','k','b','a','r',0 }; +static const WCHAR themeClass[] = L"Trackbar";
static inline int notify_customdraw (const TRACKBAR_INFO *infoPtr, NMCUSTOMDRAW *pnmcd, int stage) @@ -851,7 +851,6 @@ static void TRACKBAR_UpdateToolTip (const TRACKBAR_INFO *infoPtr) { WCHAR buf[80]; - static const WCHAR fmt[] = { '%', 'l', 'd', 0 }; TTTOOLINFOW ti; POINT pt; RECT rcClient; @@ -864,7 +863,7 @@ TRACKBAR_UpdateToolTip (const TRACKBAR_INFO *infoPtr) ti.hwnd = infoPtr->hwndSelf; ti.uFlags = TTF_IDISHWND | TTF_TRACK | TTF_ABSOLUTE;
- wsprintfW (buf, fmt, infoPtr->lPos); + wsprintfW (buf, L"%ld", infoPtr->lPos); ti.lpszText = buf; SendMessageW (infoPtr->hwndToolTip, TTM_UPDATETIPTEXTW, 0, (LPARAM)&ti);
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 06c4586fcd3..7f9a6f88cee 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -200,7 +200,7 @@ typedef struct _TREEITEM /* HTREEITEM is a _TREEINFO *. */ #define GETTXTCOLOR(x) ((x) == CLR_NONE ? comctl32_color.clrWindowText : (x)) #define GETINSCOLOR(x) ((x) == CLR_DEFAULT ? comctl32_color.clrBtnText : (x))
-static const WCHAR themeClass[] = { 'T','r','e','e','v','i','e','w',0 }; +static const WCHAR themeClass[] = L"Treeview";
typedef VOID (*TREEVIEW_ItemEnumFunc)(TREEVIEW_INFO *, TREEVIEW_ITEM *,LPVOID); diff --git a/dlls/comctl32/updown.c b/dlls/comctl32/updown.c index 54fc3f3af03..a804018d5f8 100644 --- a/dlls/comctl32/updown.c +++ b/dlls/comctl32/updown.c @@ -306,8 +306,6 @@ static BOOL UPDOWN_GetBuddyInt (UPDOWN_INFO *infoPtr) */ static BOOL UPDOWN_SetBuddyInt (const UPDOWN_INFO *infoPtr) { - static const WCHAR fmt_hex[] = { '0', 'x', '%', '0', '4', 'X', 0 }; - static const WCHAR fmt_dec_oct[] = { '%', 'd', '\0' }; const WCHAR *fmt; WCHAR txt[20], txt_old[20] = { 0 }; int len; @@ -323,7 +321,7 @@ static BOOL UPDOWN_SetBuddyInt (const UPDOWN_INFO *infoPtr) }
/* Regular window, so set caption to the number */ - fmt = (infoPtr->Base == 16) ? fmt_hex : fmt_dec_oct; + fmt = (infoPtr->Base == 16) ? L"0x%04X" : L"%d"; len = wsprintfW(txt, fmt, infoPtr->CurVal);
@@ -892,7 +890,6 @@ static void UPDOWN_HandleMouseEvent (UPDOWN_INFO *infoPtr, UINT msg, INT x, INT static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr (hwnd); - static const WCHAR themeClass[] = {'S','p','i','n',0}; HTHEME theme;
TRACE("hwnd=%p msg=%04x wparam=%08lx lparam=%08lx\n", hwnd, message, wParam, lParam); @@ -932,7 +929,7 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L if (infoPtr->dwStyle & UDS_AUTOBUDDY) UPDOWN_SetBuddy (infoPtr, GetWindow (hwnd, GW_HWNDPREV));
- OpenThemeData (hwnd, themeClass); + OpenThemeData (hwnd, L"Spin");
TRACE("UpDown Ctrl creation, hwnd=%p\n", hwnd); } @@ -968,7 +965,7 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L case WM_THEMECHANGED: theme = GetWindowTheme (hwnd); CloseThemeData (theme); - OpenThemeData (hwnd, themeClass); + OpenThemeData (hwnd, L"Spin"); InvalidateRect (hwnd, NULL, FALSE); break;
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=81914
Your paranoid android.
=== debiant (32 bit Chinese:China report) ===
comctl32: monthcal.c:1378: Test failed: Expected 2, got 1 monthcal.c:1155: Test failed: Expected 1020001, got 20001
Report validation errors: comctl32:monthcal has no test summary line (early exit of the main process?) comctl32:monthcal has unaccounted for failure messages comctl32:monthcal has unaccounted for todo messages