Nikolay Sivov : comctl32/tests: Use existing macros for control class names.

Alexandre Julliard julliard at winehq.org
Wed Feb 14 15:12:09 CST 2018


Module: wine
Branch: master
Commit: 69d90522065ecc34ef2244ca00d57eece7952375
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=69d90522065ecc34ef2244ca00d57eece7952375

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Wed Feb 14 08:33:50 2018 +0300

comctl32/tests: Use existing macros for control class names.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/comctl32/tests/button.c | 2 +-
 dlls/comctl32/tests/combo.c  | 6 +++---
 dlls/comctl32/tests/static.c | 3 ++-
 dlls/comctl32/tests/status.c | 2 +-
 4 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/dlls/comctl32/tests/button.c b/dlls/comctl32/tests/button.c
index 96b8bea..47aee3f 100644
--- a/dlls/comctl32/tests/button.c
+++ b/dlls/comctl32/tests/button.c
@@ -454,7 +454,7 @@ static HWND create_button(DWORD style, HWND parent)
         style |= WS_CHILD|BS_NOTIFY;
         menuid = (HMENU)ID_BUTTON;
     }
-    hwnd = CreateWindowExA(0, "Button", "test", style, 0, 0, 50, 14, parent, menuid, 0, NULL);
+    hwnd = CreateWindowExA(0, WC_BUTTONA, "test", style, 0, 0, 50, 14, parent, menuid, 0, NULL);
     ok(hwnd != NULL, "failed to create a button, 0x%08x, %p\n", style, parent);
     pSetWindowSubclass(hwnd, button_subclass_proc, 0, 0);
     return hwnd;
diff --git a/dlls/comctl32/tests/combo.c b/dlls/comctl32/tests/combo.c
index da2ded2..b045739 100644
--- a/dlls/comctl32/tests/combo.c
+++ b/dlls/comctl32/tests/combo.c
@@ -507,7 +507,7 @@ static BOOL init(void)
     wc.lpfnWndProc = ComboExTestWndProc;
     RegisterClassA(&wc);
 
-    hMainWnd = CreateWindowA("static", "Test", WS_OVERLAPPEDWINDOW, 10, 10, 300, 300, NULL, NULL, NULL, 0);
+    hMainWnd = CreateWindowA(WC_STATICA, "Test", WS_OVERLAPPEDWINDOW, 10, 10, 300, 300, NULL, NULL, NULL, 0);
     ShowWindow(hMainWnd, SW_SHOW);
 
     hComboExParentWnd = CreateWindowExA(0, ComboExTestClass, "ComboEx test", WS_OVERLAPPEDWINDOW|WS_VISIBLE,
@@ -606,7 +606,7 @@ static void test_comboex_get_set_item(void)
 
 static HWND create_combobox(DWORD style)
 {
-    return CreateWindowA("ComboBox", "Combo", WS_VISIBLE|WS_CHILD|style, 5, 5, 100, 100, hMainWnd, (HMENU)COMBO_ID, NULL, 0);
+    return CreateWindowA(WC_COMBOBOXA, "Combo", WS_VISIBLE|WS_CHILD|style, 5, 5, 100, 100, hMainWnd, (HMENU)COMBO_ID, NULL, 0);
 }
 
 static int font_height(HFONT hFont)
@@ -1035,7 +1035,7 @@ static void test_combo_editselection_focus(DWORD style)
     get_combobox_info(hCombo, &cbInfo);
     hEdit = cbInfo.hwndItem;
 
-    hButton = CreateWindowA("Button", "OK", WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON,
+    hButton = CreateWindowA(WC_BUTTONA, "OK", WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON,
                             5, 50, 100, 20, hMainWnd, NULL,
                             (HINSTANCE)GetWindowLongPtrA(hMainWnd, GWLP_HINSTANCE), NULL);
 
diff --git a/dlls/comctl32/tests/static.c b/dlls/comctl32/tests/static.c
index 890fcf5..a65e352 100644
--- a/dlls/comctl32/tests/static.c
+++ b/dlls/comctl32/tests/static.c
@@ -23,6 +23,7 @@
 #define STRICT
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
+#include "commctrl.h"
 
 #include "wine/test.h"
 
@@ -53,7 +54,7 @@ static void flush_events(void)
 
 static HWND create_static(DWORD style)
 {
-    return CreateWindowA("static", "Test", WS_VISIBLE|WS_CHILD|style, 5, 5, 100, 100, hMainWnd, (HMENU)CTRL_ID, NULL, 0);
+    return CreateWindowA(WC_STATICA, "Test", WS_VISIBLE|WS_CHILD|style, 5, 5, 100, 100, hMainWnd, (HMENU)CTRL_ID, NULL, 0);
 }
 
 static LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
diff --git a/dlls/comctl32/tests/status.c b/dlls/comctl32/tests/status.c
index f2fe1ab..2308974 100644
--- a/dlls/comctl32/tests/status.c
+++ b/dlls/comctl32/tests/status.c
@@ -607,7 +607,7 @@ START_TEST(status)
     iccex.dwICC  = ICC_BAR_CLASSES;
     pInitCommonControlsEx(&iccex);
 
-    g_hMainWnd = CreateWindowExA(0, "static", "", WS_OVERLAPPEDWINDOW,
+    g_hMainWnd = CreateWindowExA(0, WC_STATICA, "", WS_OVERLAPPEDWINDOW,
       CW_USEDEFAULT, CW_USEDEFAULT, 672+2*GetSystemMetrics(SM_CXSIZEFRAME),
       226+GetSystemMetrics(SM_CYCAPTION)+2*GetSystemMetrics(SM_CYSIZEFRAME),
       NULL, NULL, GetModuleHandleA(NULL), 0);




More information about the wine-cvs mailing list