Fix usage of LoadCursor in dlls/comctl32/tests
Gerald Pfeifer
gerald at pfeifer.com
Sun Oct 14 12:00:39 CDT 2007
IDC_ARROW and IDC_IBEAM are already defined as MAKEINTRESOURCE(32...), so
the call belows actually would result in
LoadCursorA(((void *)0), (LPSTR)((ULONG_PTR)((WORD)((LPSTR)((ULONG_PTR)((WORD)(32512)))))));
which is really broken in terms of casting down to WORD in the middle
of the expression again.
Gerald
ChangeLog:
Avoid remove redundant invocation of MAKEINRESOURCEA for IDC_ARROW and
IDC_IBEAM.
Index: comboex.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/tests/comboex.c,v
retrieving revision 1.8
diff -u -3 -p -r1.8 comboex.c
--- comboex.c 29 Jun 2007 13:16:28 -0000 1.8
+++ comboex.c 14 Oct 2007 16:59:05 -0000
@@ -200,7 +200,7 @@ static void init(void) {
wc.cbWndExtra = 0;
wc.hInstance = GetModuleHandleA(NULL);
wc.hIcon = NULL;
- wc.hCursor = LoadCursorA(NULL, MAKEINTRESOURCEA(IDC_ARROW));
+ wc.hCursor = LoadCursorA(NULL, IDC_ARROW);
wc.hbrBackground = GetSysColorBrush(COLOR_WINDOW);
wc.lpszMenuName = NULL;
wc.lpszClassName = ComboExTestClass;
Index: header.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/tests/header.c,v
retrieving revision 1.25
diff -u -3 -p -r1.25 header.c
--- header.c 12 Oct 2007 10:24:02 -0000 1.25
+++ header.c 14 Oct 2007 16:59:05 -0000
@@ -1493,7 +1493,7 @@ static void init(void) {
wc.cbWndExtra = 0;
wc.hInstance = GetModuleHandleA(NULL);
wc.hIcon = NULL;
- wc.hCursor = LoadCursorA(NULL, MAKEINTRESOURCEA(IDC_ARROW));
+ wc.hCursor = LoadCursorA(NULL, IDC_ARROW);
wc.hbrBackground = GetSysColorBrush(COLOR_WINDOW);
wc.lpszMenuName = NULL;
wc.lpszClassName = "HeaderTestClass";
Index: progress.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/tests/progress.c,v
retrieving revision 1.6
diff -u -3 -p -r1.6 progress.c
--- progress.c 12 Dec 2006 14:42:48 -0000 1.6
+++ progress.c 14 Oct 2007 16:59:05 -0000
@@ -88,7 +88,7 @@ static void init(void)
wc.cbWndExtra = 0;
wc.hInstance = GetModuleHandleA(NULL);
wc.hIcon = NULL;
- wc.hCursor = LoadCursorA(NULL, MAKEINTRESOURCEA(IDC_ARROW));
+ wc.hCursor = LoadCursorA(NULL, IDC_ARROW);
wc.hbrBackground = GetSysColorBrush(COLOR_WINDOW);
wc.lpszMenuName = NULL;
wc.lpszClassName = progressTestClass;
Index: rebar.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/tests/rebar.c,v
retrieving revision 1.8
diff -u -3 -p -r1.8 rebar.c
--- rebar.c 9 Oct 2007 18:39:20 -0000 1.8
+++ rebar.c 14 Oct 2007 16:59:05 -0000
@@ -800,7 +800,7 @@ START_TEST(rebar)
wc.cbWndExtra = 0;
wc.hInstance = GetModuleHandleA(NULL);
wc.hIcon = NULL;
- wc.hCursor = LoadCursorA(NULL, MAKEINTRESOURCEA(IDC_IBEAM));
+ wc.hCursor = LoadCursorA(NULL, IDC_IBEAM);
wc.hbrBackground = GetSysColorBrush(COLOR_WINDOW);
wc.lpszMenuName = NULL;
wc.lpszClassName = "MyTestWnd";
Index: toolbar.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/tests/toolbar.c,v
retrieving revision 1.33
diff -u -3 -p -r1.33 toolbar.c
--- toolbar.c 30 Aug 2007 11:21:56 -0000 1.33
+++ toolbar.c 14 Oct 2007 16:59:06 -0000
@@ -1101,7 +1101,7 @@ START_TEST(toolbar)
wc.cbWndExtra = 0;
wc.hInstance = GetModuleHandleA(NULL);
wc.hIcon = NULL;
- wc.hCursor = LoadCursorA(NULL, MAKEINTRESOURCEA(IDC_IBEAM));
+ wc.hCursor = LoadCursorA(NULL, IDC_IBEAM);
wc.hbrBackground = GetSysColorBrush(COLOR_WINDOW);
wc.lpszMenuName = NULL;
wc.lpszClassName = "MyTestWnd";
Index: treeview.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/tests/treeview.c,v
retrieving revision 1.17
diff -u -3 -p -r1.17 treeview.c
--- treeview.c 9 Oct 2007 18:39:24 -0000 1.17
+++ treeview.c 14 Oct 2007 16:59:06 -0000
@@ -663,7 +663,7 @@ START_TEST(treeview)
wc.cbWndExtra = 0;
wc.hInstance = GetModuleHandleA(NULL);
wc.hIcon = NULL;
- wc.hCursor = LoadCursorA(NULL, MAKEINTRESOURCEA(IDC_IBEAM));
+ wc.hCursor = LoadCursorA(NULL, IDC_IBEAM);
wc.hbrBackground = GetSysColorBrush(COLOR_WINDOW);
wc.lpszMenuName = NULL;
wc.lpszClassName = "MyTestWnd";
More information about the wine-patches
mailing list