[PATCH] comctl32/tests: Use existing macros for control class names
Nikolay Sivov
nsivov at codeweavers.com
Tue Feb 13 23:33:50 CST 2018
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
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 96b8bea531..47aee3f622 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 da2ded2328..b0457396c4 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 890fcf5b96..a65e352728 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 f2fe1abf98..2308974761 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);
--
2.15.1
More information about the wine-devel
mailing list