comctl32/tests: Make monthcal.c compile with -D__WINESRC__.

Michael Stefaniuc mstefani at redhat.de
Sun Dec 1 15:33:53 CST 2013


---
 dlls/comctl32/tests/monthcal.c | 415 +++++++++++++++++++++--------------------
 1 file changed, 209 insertions(+), 206 deletions(-)

diff --git a/dlls/comctl32/tests/monthcal.c b/dlls/comctl32/tests/monthcal.c
index 1a6c366..604fb99 100644
--- a/dlls/comctl32/tests/monthcal.c
+++ b/dlls/comctl32/tests/monthcal.c
@@ -270,7 +270,7 @@ static void test_monthcal(void)
 
     /* test range just after creation */
     memset(&st, 0xcc, sizeof(st));
-    limits = SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st);
+    limits = SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st);
     ok(limits == 0 ||
        broken(limits == GDTR_MIN), /* comctl32 <= 4.70 */
        "No limits should be set (%d)\n", limits);
@@ -308,21 +308,21 @@ static void test_monthcal(void)
     GetSystemTime(&st[0]);
     st[1] = st[0];
 
-    SendMessage(hwnd, MCM_GETTODAY, 0, (LPARAM)&today);
+    SendMessageA(hwnd, MCM_GETTODAY, 0, (LPARAM)&today);
 
     /* Invalid date/time */
     st[0].wYear  = 2000;
     /* Time should not matter */
     st[1].wHour = st[1].wMinute = st[1].wSecond = 70;
     st[1].wMilliseconds = 1200;
-    ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set MAX limit\n");
+    ok(SendMessageA(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set MAX limit\n");
     /* invalid timestamp is written back with today data and msecs untouched */
     expect(today.wHour, st[1].wHour);
     expect(today.wMinute, st[1].wMinute);
     expect(today.wSecond, st[1].wSecond);
     expect(1200, st[1].wMilliseconds);
 
-    ok(SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == GDTR_MAX, "No limits should be set\n");
+    ok(SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == GDTR_MAX, "No limits should be set\n");
     ok(st1[0].wYear != 2000, "Lower limit changed\n");
     /* invalid timestamp should be replaced with today data, except msecs */
     expect(today.wHour, st1[1].wHour);
@@ -335,7 +335,7 @@ static void test_monthcal(void)
     st[1] = st[0];
     /* Time should not matter */
     st[1].wMilliseconds = 1200;
-    ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set MAX limit\n");
+    ok(SendMessageA(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set MAX limit\n");
     /* invalid milliseconds field doesn't lead to invalid timestamp */
     expect(st[0].wHour,   st[1].wHour);
     expect(st[0].wMinute, st[1].wMinute);
@@ -345,11 +345,13 @@ static void test_monthcal(void)
     GetSystemTime(&st[0]);
 
     st[1].wMonth = 0;
-    ok(!SendMessage(hwnd, MCM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st), "Should have failed to set limits\n");
-    ok(SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == GDTR_MAX, "No limits should be set\n");
+    ok(!SendMessageA(hwnd, MCM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st),
+            "Should have failed to set limits\n");
+    ok(SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == GDTR_MAX, "No limits should be set\n");
     ok(st1[0].wYear != 2000, "Lower limit changed\n");
-    ok(!SendMessage(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Should have failed to set MAX limit\n");
-    ok(SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == GDTR_MAX, "No limits should be set\n");
+    ok(!SendMessageA(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st),
+            "Should have failed to set MAX limit\n");
+    ok(SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == GDTR_MAX, "No limits should be set\n");
     ok(st1[0].wYear != 2000, "Lower limit changed\n");
 
     GetSystemTime(&st[0]);
@@ -357,44 +359,52 @@ static void test_monthcal(void)
     st[0].wMonth = 5;
     st[1] = st[0];
 
-    month_range = SendMessage(hwnd, MCM_GETMONTHRANGE, GMR_VISIBLE, (LPARAM)st1);
+    month_range = SendMessageA(hwnd, MCM_GETMONTHRANGE, GMR_VISIBLE, (LPARAM)st1);
     st[1].wMonth--;
-    ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st), "Failed to set both min and max limits\n");
-    res = SendMessage(hwnd, MCM_GETMONTHRANGE, GMR_VISIBLE, (LPARAM)st1);
+    ok(SendMessageA(hwnd, MCM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st),
+            "Failed to set both min and max limits\n");
+    res = SendMessageA(hwnd, MCM_GETMONTHRANGE, GMR_VISIBLE, (LPARAM)st1);
     ok(res == month_range, "Invalid month range (%d)\n", res);
-    ok(SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == (GDTR_MIN|GDTR_MAX), "Limits should be set\n");
+    ok(SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == (GDTR_MIN|GDTR_MAX),
+            "Limits should be set\n");
 
     st[1].wMonth += 2;
-    ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st), "Failed to set both min and max limits\n");
-    res = SendMessage(hwnd, MCM_GETMONTHRANGE, GMR_VISIBLE, (LPARAM)st1);
+    ok(SendMessageA(hwnd, MCM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st),
+            "Failed to set both min and max limits\n");
+    res = SendMessageA(hwnd, MCM_GETMONTHRANGE, GMR_VISIBLE, (LPARAM)st1);
     ok(res == month_range, "Invalid month range (%d)\n", res);
 
     st[1].wYear --;
-    ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st), "Failed to set both min and max limits\n");
+    ok(SendMessageA(hwnd, MCM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st),
+            "Failed to set both min and max limits\n");
     st[1].wYear += 1;
-    ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st), "Failed to set both min and max limits\n");
+    ok(SendMessageA(hwnd, MCM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st),
+            "Failed to set both min and max limits\n");
 
     st[1].wMonth -= 3;
-    ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set max limit\n");
-    ok(SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == GDTR_MAX, "Only MAX limit should be set\n");
+    ok(SendMessageA(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set max limit\n");
+    ok(SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == GDTR_MAX,
+            "Only MAX limit should be set\n");
     st[1].wMonth += 4;
-    ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set max limit\n");
+    ok(SendMessageA(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set max limit\n");
     st[1].wYear -= 3;
-    ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set max limit\n");
+    ok(SendMessageA(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set max limit\n");
     st[1].wYear += 4;
-    ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set max limit\n");
-    ok(SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == GDTR_MAX, "Only MAX limit should be set\n");
+    ok(SendMessageA(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set max limit\n");
+    ok(SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == GDTR_MAX,
+            "Only MAX limit should be set\n");
 
     /* set both limits, then set max < min */
     GetSystemTime(&st[0]);
     st[0].wDay = 25;
     st[1] = st[0];
     st[1].wYear++;
-    ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MIN|GDTR_MAX, (LPARAM)st), "Failed to set limits\n");
-    ok(SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == (GDTR_MIN|GDTR_MAX), "Min limit expected\n");
+    ok(SendMessageA(hwnd, MCM_SETRANGE, GDTR_MIN|GDTR_MAX, (LPARAM)st), "Failed to set limits\n");
+    ok(SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == (GDTR_MIN|GDTR_MAX),
+            "Min limit expected\n");
     st[1].wYear -= 2;
-    ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set limits\n");
-    ok(SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == GDTR_MAX, "Max limit expected\n");
+    ok(SendMessageA(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set limits\n");
+    ok(SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == GDTR_MAX, "Max limit expected\n");
 
     expect(0, st1[0].wYear);
     expect(0, st1[0].wMonth);
@@ -416,11 +426,12 @@ static void test_monthcal(void)
 
     st[1] = st[0];
     st[1].wYear++;
-    ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MIN|GDTR_MAX, (LPARAM)st), "Failed to set limits\n");
-    ok(SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == (GDTR_MIN|GDTR_MAX), "Min limit expected\n");
+    ok(SendMessageA(hwnd, MCM_SETRANGE, GDTR_MIN|GDTR_MAX, (LPARAM)st), "Failed to set limits\n");
+    ok(SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == (GDTR_MIN|GDTR_MAX),
+            "Min limit expected\n");
     st[0].wYear++; /* start == end now */
-    ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MIN, (LPARAM)st), "Failed to set limits\n");
-    ok(SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == GDTR_MIN, "Min limit expected\n");
+    ok(SendMessageA(hwnd, MCM_SETRANGE, GDTR_MIN, (LPARAM)st), "Failed to set limits\n");
+    ok(SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == GDTR_MIN, "Min limit expected\n");
 
     expect(st[0].wYear,      st1[0].wYear);
     expect(st[0].wMonth,     st1[0].wMonth);
@@ -490,13 +501,12 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP
           {
             NMSELCHANGE *nmchg = (NMSELCHANGE*)lParam;
             SYSTEMTIME st[2];
-            BOOL is_multisel = GetWindowLongPtr(nmchg->nmhdr.hwndFrom, GWL_STYLE) &
-                        MCS_MULTISELECT;
+            BOOL is_multisel = GetWindowLongPtrA(nmchg->nmhdr.hwndFrom, GWL_STYLE) & MCS_MULTISELECT;
 
-            if(GetWindowLongPtr(nmchg->nmhdr.hwndFrom, GWLP_ID) != SEL_NOTIFY_TEST_ID)
+            if(GetWindowLongPtrA(nmchg->nmhdr.hwndFrom, GWLP_ID) != SEL_NOTIFY_TEST_ID)
               break;
-            SendMessage(nmchg->nmhdr.hwndFrom, is_multisel ? MCM_GETSELRANGE :
-                        MCM_GETCURSEL, 0, (LPARAM)st);
+            SendMessageA(nmchg->nmhdr.hwndFrom, is_multisel ? MCM_GETSELRANGE : MCM_GETCURSEL,
+                    0, (LPARAM)st);
 
             expect(st[0].wYear,  nmchg->stSelStart.wYear);
             expect(st[0].wMonth, nmchg->stSelStart.wMonth);
@@ -540,7 +550,7 @@ static BOOL register_parent_wnd_class(void)
     cls.cbWndExtra = 0;
     cls.hInstance = GetModuleHandleA(NULL);
     cls.hIcon = 0;
-    cls.hCursor = LoadCursorA(0, IDC_ARROW);
+    cls.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
     cls.hbrBackground = GetStockObject(WHITE_BRUSH);
     cls.lpszMenuName = NULL;
     cls.lpszClassName = "Month-Cal test parent class";
@@ -559,12 +569,9 @@ static HWND create_parent_window(void)
     if (!register_parent_wnd_class())
         return NULL;
 
-    hwnd = CreateWindowEx(0, "Month-Cal test parent class",
-                          "Month-Cal test parent window",
-                          WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX |
-                          WS_MAXIMIZEBOX | WS_VISIBLE,
-                          0, 0, 500, 500,
-                          GetDesktopWindow(), NULL, GetModuleHandleA(NULL), NULL);
+    hwnd = CreateWindowExA(0, "Month-Cal test parent class", "Month-Cal test parent window",
+            WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_VISIBLE,
+            0, 0, 500, 500, GetDesktopWindow(), NULL, GetModuleHandleA(NULL), NULL);
 
     assert(hwnd);
 
@@ -609,12 +616,8 @@ static HWND create_monthcal_control(DWORD style)
     WNDPROC oldproc;
     HWND hwnd;
 
-    hwnd = CreateWindowEx(0,
-                    MONTHCAL_CLASS,
-                    "",
-                    WS_CHILD | WS_BORDER | WS_VISIBLE | style,
-                    0, 0, 300, 400,
-                    parent_wnd, NULL, GetModuleHandleA(NULL), NULL);
+    hwnd = CreateWindowExA(0, MONTHCAL_CLASSA, "", WS_CHILD | WS_BORDER | WS_VISIBLE | style,
+                    0, 0, 300, 400, parent_wnd, NULL, GetModuleHandleA(NULL), NULL);
 
     if (!hwnd) return NULL;
 
@@ -622,7 +625,7 @@ static HWND create_monthcal_control(DWORD style)
                                         (LONG_PTR)monthcal_subclass_proc);
     SetWindowLongPtrA(hwnd, GWLP_USERDATA, (LONG_PTR)oldproc);
 
-    SendMessage(hwnd, WM_SETFONT, (WPARAM)GetStockObject(SYSTEM_FONT), 0);
+    SendMessageA(hwnd, WM_SETFONT, (WPARAM)GetStockObject(SYSTEM_FONT), 0);
 
     return hwnd;
 }
@@ -638,69 +641,69 @@ static void test_color(void)
     hwnd = create_monthcal_control(0);
 
     /* invalid color index */
-    color = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TRAILINGTEXT + 1, 0);
+    color = SendMessageA(hwnd, MCM_GETCOLOR, MCSC_TRAILINGTEXT + 1, 0);
     expect(~0u, color);
-    prev = SendMessage(hwnd, MCM_SETCOLOR, MCSC_TRAILINGTEXT + 1, RGB(255,255,255));
+    prev = SendMessageA(hwnd, MCM_SETCOLOR, MCSC_TRAILINGTEXT + 1, RGB(255,255,255));
     expect(~0u, prev);
 
-    color = SendMessage(hwnd, MCM_GETCOLOR, MCSC_BACKGROUND, 0);
-    prev = SendMessage(hwnd, MCM_SETCOLOR, MCSC_BACKGROUND, RGB(0,0,0));
+    color = SendMessageA(hwnd, MCM_GETCOLOR, MCSC_BACKGROUND, 0);
+    prev = SendMessageA(hwnd, MCM_SETCOLOR, MCSC_BACKGROUND, RGB(0,0,0));
     expect(color, prev);
-    color = SendMessage(hwnd, MCM_GETCOLOR, MCSC_BACKGROUND, 0);
+    color = SendMessageA(hwnd, MCM_GETCOLOR, MCSC_BACKGROUND, 0);
     expect(RGB(0,0,0), color);
-    prev = SendMessage(hwnd, MCM_SETCOLOR, MCSC_BACKGROUND, RGB(255,255,255));
+    prev = SendMessageA(hwnd, MCM_SETCOLOR, MCSC_BACKGROUND, RGB(255,255,255));
     expect(color, prev);
-    color = SendMessage(hwnd, MCM_GETCOLOR, MCSC_BACKGROUND, 0);
+    color = SendMessageA(hwnd, MCM_GETCOLOR, MCSC_BACKGROUND, 0);
     expect(RGB(255,255,255), color);
 
-    color = SendMessage(hwnd, MCM_GETCOLOR, MCSC_MONTHBK, 0);
-    prev = SendMessage(hwnd, MCM_SETCOLOR, MCSC_MONTHBK, RGB(0,0,0));
+    color = SendMessageA(hwnd, MCM_GETCOLOR, MCSC_MONTHBK, 0);
+    prev = SendMessageA(hwnd, MCM_SETCOLOR, MCSC_MONTHBK, RGB(0,0,0));
     expect(color, prev);
-    color = SendMessage(hwnd, MCM_GETCOLOR, MCSC_MONTHBK, 0);
+    color = SendMessageA(hwnd, MCM_GETCOLOR, MCSC_MONTHBK, 0);
     expect(RGB(0,0,0), color);
-    prev = SendMessage(hwnd, MCM_SETCOLOR, MCSC_MONTHBK, RGB(255,255,255));
+    prev = SendMessageA(hwnd, MCM_SETCOLOR, MCSC_MONTHBK, RGB(255,255,255));
     expect(color, prev);
-    color = SendMessage(hwnd, MCM_GETCOLOR, MCSC_MONTHBK, 0);
+    color = SendMessageA(hwnd, MCM_GETCOLOR, MCSC_MONTHBK, 0);
     expect(RGB(255,255,255), color);
 
-    color = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TEXT, 0);
-    prev = SendMessage(hwnd, MCM_SETCOLOR, MCSC_TEXT, RGB(0,0,0));
+    color = SendMessageA(hwnd, MCM_GETCOLOR, MCSC_TEXT, 0);
+    prev = SendMessageA(hwnd, MCM_SETCOLOR, MCSC_TEXT, RGB(0,0,0));
     expect(color, prev);
-    color = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TEXT, 0);
+    color = SendMessageA(hwnd, MCM_GETCOLOR, MCSC_TEXT, 0);
     expect(RGB(0,0,0), color);
-    prev = SendMessage(hwnd, MCM_SETCOLOR, MCSC_TEXT, RGB(255,255,255));
+    prev = SendMessageA(hwnd, MCM_SETCOLOR, MCSC_TEXT, RGB(255,255,255));
     expect(color, prev);
-    color = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TEXT, 0);
+    color = SendMessageA(hwnd, MCM_GETCOLOR, MCSC_TEXT, 0);
     expect(RGB(255,255,255), color);
 
-    color = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TITLEBK, 0);
-    prev = SendMessage(hwnd, MCM_SETCOLOR, MCSC_TITLEBK, RGB(0,0,0));
+    color = SendMessageA(hwnd, MCM_GETCOLOR, MCSC_TITLEBK, 0);
+    prev = SendMessageA(hwnd, MCM_SETCOLOR, MCSC_TITLEBK, RGB(0,0,0));
     expect(color, prev);
-    color = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TITLEBK, 0);
+    color = SendMessageA(hwnd, MCM_GETCOLOR, MCSC_TITLEBK, 0);
     expect(RGB(0,0,0), color);
-    prev = SendMessage(hwnd, MCM_SETCOLOR, MCSC_TITLEBK, RGB(255,255,255));
+    prev = SendMessageA(hwnd, MCM_SETCOLOR, MCSC_TITLEBK, RGB(255,255,255));
     expect(color, prev);
-    color = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TITLEBK, 0);
+    color = SendMessageA(hwnd, MCM_GETCOLOR, MCSC_TITLEBK, 0);
     expect(RGB(255,255,255), color);
 
-    color = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TITLETEXT, 0);
-    prev = SendMessage(hwnd, MCM_SETCOLOR, MCSC_TITLETEXT, RGB(0,0,0));
+    color = SendMessageA(hwnd, MCM_GETCOLOR, MCSC_TITLETEXT, 0);
+    prev = SendMessageA(hwnd, MCM_SETCOLOR, MCSC_TITLETEXT, RGB(0,0,0));
     expect(color, prev);
-    color = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TITLETEXT, 0);
+    color = SendMessageA(hwnd, MCM_GETCOLOR, MCSC_TITLETEXT, 0);
     expect(RGB(0,0,0), color);
-    prev = SendMessage(hwnd, MCM_SETCOLOR, MCSC_TITLETEXT, RGB(255,255,255));
+    prev = SendMessageA(hwnd, MCM_SETCOLOR, MCSC_TITLETEXT, RGB(255,255,255));
     expect(color, prev);
-    color = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TITLETEXT, 0);
+    color = SendMessageA(hwnd, MCM_GETCOLOR, MCSC_TITLETEXT, 0);
     expect(RGB(255,255,255), color);
 
-    color = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TRAILINGTEXT, 0);
-    prev = SendMessage(hwnd, MCM_SETCOLOR, MCSC_TRAILINGTEXT, RGB(0,0,0));
+    color = SendMessageA(hwnd, MCM_GETCOLOR, MCSC_TRAILINGTEXT, 0);
+    prev = SendMessageA(hwnd, MCM_SETCOLOR, MCSC_TRAILINGTEXT, RGB(0,0,0));
     expect(color, prev);
-    color = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TRAILINGTEXT, 0);
+    color = SendMessageA(hwnd, MCM_GETCOLOR, MCSC_TRAILINGTEXT, 0);
     expect(RGB(0,0,0), color);
-    prev = SendMessage(hwnd, MCM_SETCOLOR, MCSC_TRAILINGTEXT, RGB(255,255,255));
+    prev = SendMessageA(hwnd, MCM_SETCOLOR, MCSC_TRAILINGTEXT, RGB(255,255,255));
     expect(color, prev);
-    color = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TRAILINGTEXT, 0);
+    color = SendMessageA(hwnd, MCM_GETCOLOR, MCSC_TRAILINGTEXT, 0);
     expect(RGB(255,255,255), color);
 
     DestroyWindow(hwnd);
@@ -729,12 +732,12 @@ static void test_currdate(void)
     st_new = st_test = st_original;
 
     /* Should not validate the time */
-    res = SendMessage(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st_test);
+    res = SendMessageA(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st_test);
     expect(1,res);
 
     /* Overflow matters, check for wDay */
     st_test.wDay += 4;
-    res = SendMessage(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st_test);
+    res = SendMessageA(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st_test);
     expect(0,res);
 
     /* correct wDay before checking for wMonth */
@@ -743,7 +746,7 @@ static void test_currdate(void)
 
     /* Overflow matters, check for wMonth */
     st_test.wMonth += 4;
-    res = SendMessage(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st_test);
+    res = SendMessageA(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st_test);
     expect(0,res);
 
     /* checking if gets the information right, modify st_new */
@@ -754,7 +757,7 @@ static void test_currdate(void)
     st_new.wMinute += 4;
     st_new.wSecond += 4;
 
-    res = SendMessage(hwnd, MCM_GETCURSEL, 0, (LPARAM)&st_new);
+    res = SendMessageA(hwnd, MCM_GETCURSEL, 0, (LPARAM)&st_new);
     expect(1, res);
 
     /* st_new change to st_origin, above settings with overflow */
@@ -773,7 +776,7 @@ static void test_currdate(void)
        "Expected %d, got %d\n", st_original.wSecond, st_new.wSecond);
 
     /* lparam cannot be NULL */
-    res = SendMessage(hwnd, MCM_GETCURSEL, 0, 0);
+    res = SendMessageA(hwnd, MCM_GETCURSEL, 0, 0);
     expect(0, res);
 
     ok_sequence(sequences, MONTHCAL_SEQ_INDEX, monthcal_curr_date_seq, "monthcal currDate", TRUE);
@@ -783,10 +786,10 @@ static void test_currdate(void)
     st_new.wYear = 9999;
     st_new.wMonth = 12;
     st_new.wDay = 31;
-    res = SendMessage(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st_new);
+    res = SendMessageA(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st_new);
     expect(1, res);
     memset(&st_test, 0, sizeof(st_test));
-    res = SendMessage(hwnd, MCM_GETCURSEL, 0, (LPARAM)&st_test);
+    res = SendMessageA(hwnd, MCM_GETCURSEL, 0, (LPARAM)&st_test);
     expect(1, res);
     expect(st_new.wYear, st_test.wYear);
     expect(st_new.wMonth, st_test.wMonth);
@@ -799,14 +802,14 @@ static void test_currdate(void)
     st_new.wYear = 10000;
     st_new.wMonth = 1;
     st_new.wDay = 1;
-    res = SendMessage(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st_new);
+    res = SendMessageA(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st_new);
     ok(0 == res ||
        broken(1 == res), /* comctl32 <= 4.72 */
        "Expected 0, got %d\n", res);
     if (0 == res)
     {
         memset(&st_test, 0, sizeof(st_test));
-        res = SendMessage(hwnd, MCM_GETCURSEL, 0, (LPARAM)&st_test);
+        res = SendMessageA(hwnd, MCM_GETCURSEL, 0, (LPARAM)&st_test);
         expect(1, res);
         expect(st_original.wYear, st_test.wYear);
         expect(st_original.wMonth, st_test.wMonth);
@@ -821,16 +824,16 @@ static void test_currdate(void)
     st_new.wYear = 2009;
     st_new.wDay  = 5;
     st_new.wMonth = 10;
-    res = SendMessage(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st_new);
+    res = SendMessageA(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st_new);
     expect(1, res);
     memset(&st_test, 0, sizeof(st_test));
     st_test.wYear = 2009;
     st_test.wDay  = 6;
     st_test.wMonth = 10;
-    res = SendMessage(hwnd, MCM_SETRANGE, GDTR_MIN, (LPARAM)&st_test);
+    res = SendMessageA(hwnd, MCM_SETRANGE, GDTR_MIN, (LPARAM)&st_test);
     expect(1, res);
     /* set to current again */
-    res = SendMessage(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st_new);
+    res = SendMessageA(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st_new);
     expect(1, res);
 
     /* set with invalid day of week */
@@ -839,11 +842,11 @@ static void test_currdate(void)
     st_test.wDay  = 7;
     st_test.wMonth = 10;
     st_test.wDayOfWeek = 100;
-    res = SendMessage(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st_test);
+    res = SendMessageA(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st_test);
     expect(1, res);
 
     memset(&st_test, 0, sizeof(st_test));
-    res = SendMessage(hwnd, MCM_GETCURSEL, 0, (LPARAM)&st_test);
+    res = SendMessageA(hwnd, MCM_GETCURSEL, 0, (LPARAM)&st_test);
     expect(1, res);
     expect(2009, st_test.wYear);
     expect(7, st_test.wDay);
@@ -879,16 +882,16 @@ static void test_firstDay(void)
     /* check for locale first day */
     if(GetLocaleInfoA(lcid, LOCALE_IFIRSTDAYOFWEEK, b, 128)){
         fday = atoi(b);
-        res = SendMessage(hwnd, MCM_GETFIRSTDAYOFWEEK, 0, 0);
+        res = SendMessageA(hwnd, MCM_GETFIRSTDAYOFWEEK, 0, 0);
         expect(fday, res);
         prev = fday;
 
         /* checking for the values that actually will be stored as */
         /* current first day when we set a new value */
         for (i = -5; i < 12; i++){
-            res = SendMessage(hwnd, MCM_SETFIRSTDAYOFWEEK, 0, i);
+            res = SendMessageA(hwnd, MCM_SETFIRSTDAYOFWEEK, 0, i);
             expect(prev, res);
-            res = SendMessage(hwnd, MCM_GETFIRSTDAYOFWEEK, 0, 0);
+            res = SendMessageA(hwnd, MCM_GETFIRSTDAYOFWEEK, 0, 0);
             prev = res;
 
             if (i == -1){
@@ -922,30 +925,30 @@ static void test_unicode(void)
     /* Setter and Getters for Unicode format */
 
     /* getting the current settings */
-    temp = SendMessage(hwnd, MCM_GETUNICODEFORMAT, 0, 0);
+    temp = SendMessageA(hwnd, MCM_GETUNICODEFORMAT, 0, 0);
 
     /* setting to 1, should return previous settings */
-    res = SendMessage(hwnd, MCM_SETUNICODEFORMAT, 1, 0);
+    res = SendMessageA(hwnd, MCM_SETUNICODEFORMAT, 1, 0);
     expect(temp, res);
 
     /* current setting is 1, so, should return 1 */
-    res = SendMessage(hwnd, MCM_GETUNICODEFORMAT, 0, 0);
+    res = SendMessageA(hwnd, MCM_GETUNICODEFORMAT, 0, 0);
     ok(1 == res ||
        broken(0 == res), /* comctl32 <= 4.70 */
        "Expected 1, got %d\n", res);
 
     /* setting to 0, should return previous settings */
-    res = SendMessage(hwnd, MCM_SETUNICODEFORMAT, 0, 0);
+    res = SendMessageA(hwnd, MCM_SETUNICODEFORMAT, 0, 0);
     ok(1 == res ||
        broken(0 == res), /* comctl32 <= 4.70 */
        "Expected 1, got %d\n", res);
 
     /* current setting is 0, so, it should return 0 */
-    res = SendMessage(hwnd, MCM_GETUNICODEFORMAT, 0, 0);
+    res = SendMessageA(hwnd, MCM_GETUNICODEFORMAT, 0, 0);
     expect(0, res);
 
     /* should return previous settings */
-    res = SendMessage(hwnd, MCM_SETUNICODEFORMAT, 1, 0);
+    res = SendMessageA(hwnd, MCM_SETUNICODEFORMAT, 1, 0);
     expect(0, res);
 
     ok_sequence(sequences, MONTHCAL_SEQ_INDEX, monthcal_unicode_seq, "monthcal unicode", FALSE);
@@ -991,17 +994,17 @@ static void test_hittest(void)
     mchit.cbSize = MCHITTESTINFO_V1_SIZE - 1;
     mchit.pt.x = 0;
     mchit.pt.y = 0;
-    res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
+    res = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
     expect(0, mchit.pt.x);
     expect(0, mchit.pt.y);
     expect(~0u, res);
     expect(0, mchit.uHit);
     /* test with invalid pointer */
-    res = SendMessage(hwnd, MCM_HITTEST, 0, 0);
+    res = SendMessageA(hwnd, MCM_HITTEST, 0, 0);
     expect(~0u, res);
 
     /* resize control to display single Calendar */
-    res = SendMessage(hwnd, MCM_GETMINREQRECT, 0, (LPARAM)&r);
+    res = SendMessageA(hwnd, MCM_GETMINREQRECT, 0, (LPARAM)&r);
     if (res == 0)
     {
         win_skip("Message MCM_GETMINREQRECT unsupported. Skipping.\n");
@@ -1021,14 +1024,14 @@ static void test_hittest(void)
     st.wMilliseconds = 0;
     st.wDayOfWeek = 0;
 
-    res = SendMessage(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st);
+    res = SendMessageA(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st);
     expect(1,res);
 
     /* (0, 0) is the top left of the control - title */
     mchit.cbSize = MCHITTESTINFO_V1_SIZE;
     mchit.pt.x = 0;
     mchit.pt.y = 0;
-    res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
+    res = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
     expect(0, mchit.pt.x);
     expect(0, mchit.pt.y);
     expect(mchit.uHit, res);
@@ -1037,7 +1040,7 @@ static void test_hittest(void)
     /* bottom right of the control and should not be active */
     mchit.pt.x = r.right;
     mchit.pt.y = r.bottom;
-    res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
+    res = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
     expect(r.right,  mchit.pt.x);
     expect(r.bottom, mchit.pt.y);
     expect(mchit.uHit, res);
@@ -1046,7 +1049,7 @@ static void test_hittest(void)
     /* completely out of the control, should not be active */
     mchit.pt.x = 2 * r.right;
     mchit.pt.y = 2 * r.bottom;
-    res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit);
+    res = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
     expect(2 * r.right, mchit.pt.x);
     expect(2 * r.bottom, mchit.pt.y);
     expect(mchit.uHit, res);
@@ -1055,7 +1058,7 @@ static void test_hittest(void)
     /* in active area - day of the week */
     mchit.pt.x = r.right / 2;
     mchit.pt.y = r.bottom / 2;
-    res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit);
+    res = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
     expect(r.right / 2, mchit.pt.x);
     expect(r.bottom / 2, mchit.pt.y);
     expect(mchit.uHit, res);
@@ -1064,7 +1067,7 @@ static void test_hittest(void)
     /* in active area - day of the week #2 */
     mchit.pt.x = r.right / 14; /* half of first day rect */
     mchit.pt.y = r.bottom / 2;
-    res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit);
+    res = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
     expect(r.right / 14, mchit.pt.x);
     expect(r.bottom / 2, mchit.pt.y);
     expect(mchit.uHit, res);
@@ -1073,7 +1076,7 @@ static void test_hittest(void)
     /* in active area - date from prev month */
     mchit.pt.x = r.right / 14; /* half of first day rect */
     mchit.pt.y = 6 * r.bottom / 19;
-    res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit);
+    res = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
     expect(r.right / 14, mchit.pt.x);
     expect(6 * r.bottom / 19, mchit.pt.y);
     expect(mchit.uHit, res);
@@ -1083,7 +1086,7 @@ static void test_hittest(void)
     /* (125, 115) is in active area - date from this month */
     mchit.pt.x = 125;
     mchit.pt.y = 115;
-    res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit);
+    res = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
     expect(125, mchit.pt.x);
     expect(115, mchit.pt.y);
     expect(mchit.uHit, res);
@@ -1093,7 +1096,7 @@ static void test_hittest(void)
     /* in active area - date from next month */
     mchit.pt.x = 11 * r.right / 14;
     mchit.pt.y = 16 * r.bottom / 19;
-    res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit);
+    res = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
     expect(11 * r.right / 14, mchit.pt.x);
     expect(16 * r.bottom / 19, mchit.pt.y);
     expect(mchit.uHit, res);
@@ -1102,7 +1105,7 @@ static void test_hittest(void)
     /* in active area - today link */
     mchit.pt.x = r.right / 14;
     mchit.pt.y = 18 * r.bottom / 19;
-    res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit);
+    res = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
     expect(r.right / 14, mchit.pt.x);
     expect(18 * r.bottom / 19, mchit.pt.y);
     expect(mchit.uHit, res);
@@ -1111,7 +1114,7 @@ static void test_hittest(void)
     /* in active area - today link */
     mchit.pt.x = r.right / 2;
     mchit.pt.y = 18 * r.bottom / 19;
-    res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit);
+    res = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
     expect(r.right / 2, mchit.pt.x);
     expect(18 * r.bottom / 19, mchit.pt.y);
     expect(mchit.uHit, res);
@@ -1120,7 +1123,7 @@ static void test_hittest(void)
     /* in active area - today link */
     mchit.pt.x = r.right / 10;
     mchit.pt.y = 18 * r.bottom / 19;
-    res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit);
+    res = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
     expect(r.right / 10, mchit.pt.x);
     expect(18 * r.bottom / 19, mchit.pt.y);
     expect(mchit.uHit, res);
@@ -1133,7 +1136,7 @@ static void test_hittest(void)
        find all elements. */
 
     /* Get the format of the title */
-    GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SYEARMONTH, yearmonth, 80);
+    GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_SYEARMONTH, yearmonth, 80);
     /* Find out if we have a month and/or year */
     locale_year = strstr(yearmonth, "y");
     locale_month = strstr(yearmonth, "M");
@@ -1141,14 +1144,14 @@ static void test_hittest(void)
     mchit.pt.x = 0;
     mchit.pt.y = (5/2) * r.bottom / 19;
     title_index = 0;
-    old_res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit);
+    old_res = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
     expect_hex(title_hits[title_index].ht, old_res);
 
     in_the_middle = FALSE;
     month_count = year_count = 0;
     for (x = 0; x < r.right; x++){
         mchit.pt.x = x;
-        res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit);
+        res = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
         expect(x, mchit.pt.x);
         expect((5/2) * r.bottom / 19, mchit.pt.y);
         expect(mchit.uHit, res);
@@ -1216,7 +1219,7 @@ static void test_todaylink(void)
 
     hwnd = create_monthcal_control(0);
 
-    res = SendMessage(hwnd, MCM_GETMINREQRECT, 0, (LPARAM)&r);
+    res = SendMessageA(hwnd, MCM_GETMINREQRECT, 0, (LPARAM)&r);
     expect(1, res);
     MoveWindow(hwnd, 0, 0, r.right, r.bottom, FALSE);
 
@@ -1226,7 +1229,7 @@ static void test_todaylink(void)
     mchit.cbSize = MCHITTESTINFO_V1_SIZE;
     mchit.pt.x = r.right / 14;
     mchit.pt.y = 18 * r.bottom / 19;
-    res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit);
+    res = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
     expect(r.right / 14, mchit.pt.x);
     expect(18 * r.bottom / 19, mchit.pt.y);
     expect(mchit.uHit, res);
@@ -1236,21 +1239,21 @@ static void test_todaylink(void)
     st_test.wMonth = 1;
     st_test.wYear = 2005;
 
-    res = SendMessage(hwnd, MCM_SETTODAY, 0, (LPARAM)&st_test);
+    res = SendMessageA(hwnd, MCM_SETTODAY, 0, (LPARAM)&st_test);
     expect(0, res);
 
     memset(&st_new, 0, sizeof(st_new));
-    res = SendMessage(hwnd, MCM_GETTODAY, 0, (LPARAM)&st_new);
+    res = SendMessageA(hwnd, MCM_GETTODAY, 0, (LPARAM)&st_new);
     expect(1, res);
     expect(1, st_new.wDay);
     expect(1, st_new.wMonth);
     expect(2005, st_new.wYear);
 
-    res = SendMessage(hwnd, WM_LBUTTONDOWN, MK_LBUTTON, MAKELONG(mchit.pt.x, mchit.pt.y));
+    res = SendMessageA(hwnd, WM_LBUTTONDOWN, MK_LBUTTON, MAKELONG(mchit.pt.x, mchit.pt.y));
     expect(0, res);
 
     memset(&st_new, 0, sizeof(st_new));
-    res = SendMessage(hwnd, MCM_GETCURSEL, 0, (LPARAM)&st_new);
+    res = SendMessageA(hwnd, MCM_GETCURSEL, 0, (LPARAM)&st_new);
     expect(1, res);
     expect(1, st_new.wDay);
     expect(1, st_new.wMonth);
@@ -1281,10 +1284,10 @@ static void test_today(void)
     st_new.wDay = 27;
     st_new.wMonth = 27;
 
-    res = SendMessage(hwnd, MCM_SETTODAY, 0, (LPARAM)&st_test);
+    res = SendMessageA(hwnd, MCM_SETTODAY, 0, (LPARAM)&st_test);
     expect(0, res);
 
-    res = SendMessage(hwnd, MCM_GETTODAY, 0, (LPARAM)&st_new);
+    res = SendMessageA(hwnd, MCM_GETTODAY, 0, (LPARAM)&st_new);
     expect(1, res);
 
     /* st_test should not change */
@@ -1299,10 +1302,10 @@ static void test_today(void)
     st_test.wDay = 0;
     st_test.wMonth = 0;
 
-    res = SendMessage(hwnd, MCM_SETTODAY, 0, (LPARAM)&st_test);
+    res = SendMessageA(hwnd, MCM_SETTODAY, 0, (LPARAM)&st_test);
     expect(0, res);
 
-    res = SendMessage(hwnd, MCM_GETTODAY, 0, (LPARAM)&st_new);
+    res = SendMessageA(hwnd, MCM_GETTODAY, 0, (LPARAM)&st_new);
     expect(1, res);
 
     /* st_test should not change */
@@ -1325,33 +1328,33 @@ static void test_scroll(void)
 
     hwnd = create_monthcal_control(0);
 
-    res = SendMessage(hwnd, MCM_GETMONTHDELTA, 0, 0);
+    res = SendMessageA(hwnd, MCM_GETMONTHDELTA, 0, 0);
     expect(2, res);
 
     flush_sequences(sequences, NUM_MSG_SEQUENCES);
 
     /* Setter and Getters for scroll rate */
-    res = SendMessage(hwnd, MCM_SETMONTHDELTA, 2, 0);
+    res = SendMessageA(hwnd, MCM_SETMONTHDELTA, 2, 0);
     expect(0, res);
 
-    res = SendMessage(hwnd, MCM_SETMONTHDELTA, 3, 0);
+    res = SendMessageA(hwnd, MCM_SETMONTHDELTA, 3, 0);
     expect(2, res);
-    res = SendMessage(hwnd, MCM_GETMONTHDELTA, 0, 0);
+    res = SendMessageA(hwnd, MCM_GETMONTHDELTA, 0, 0);
     expect(3, res);
 
-    res = SendMessage(hwnd, MCM_SETMONTHDELTA, 12, 0);
+    res = SendMessageA(hwnd, MCM_SETMONTHDELTA, 12, 0);
     expect(3, res);
-    res = SendMessage(hwnd, MCM_GETMONTHDELTA, 0, 0);
+    res = SendMessageA(hwnd, MCM_GETMONTHDELTA, 0, 0);
     expect(12, res);
 
-    res = SendMessage(hwnd, MCM_SETMONTHDELTA, 15, 0);
+    res = SendMessageA(hwnd, MCM_SETMONTHDELTA, 15, 0);
     expect(12, res);
-    res = SendMessage(hwnd, MCM_GETMONTHDELTA, 0, 0);
+    res = SendMessageA(hwnd, MCM_GETMONTHDELTA, 0, 0);
     expect(15, res);
 
-    res = SendMessage(hwnd, MCM_SETMONTHDELTA, -5, 0);
+    res = SendMessageA(hwnd, MCM_SETMONTHDELTA, -5, 0);
     expect(15, res);
-    res = SendMessage(hwnd, MCM_GETMONTHDELTA, 0, 0);
+    res = SendMessageA(hwnd, MCM_GETMONTHDELTA, 0, 0);
     expect(-5, res);
 
     ok_sequence(sequences, MONTHCAL_SEQ_INDEX, monthcal_scroll_seq, "monthcal scroll", FALSE);
@@ -1380,20 +1383,20 @@ static void test_monthrange(void)
     st.wMilliseconds = 0;
     st.wDayOfWeek = 0;
 
-    res = SendMessage(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st);
+    res = SendMessageA(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st);
     expect(1,res);
 
     /* to be locale independent */
-    SendMessage(hwnd, MCM_SETFIRSTDAYOFWEEK, 0, (LPARAM)6);
+    SendMessageA(hwnd, MCM_SETFIRSTDAYOFWEEK, 0, (LPARAM)6);
 
-    res = SendMessage(hwnd, MCM_GETMINREQRECT, 0, (LPARAM)&r);
+    res = SendMessageA(hwnd, MCM_GETMINREQRECT, 0, (LPARAM)&r);
     expect(TRUE, res);
     /* resize control to display two Calendars */
     MoveWindow(hwnd, 0, 0, r.right, (5/2)*r.bottom, FALSE);
 
     flush_sequences(sequences, NUM_MSG_SEQUENCES);
 
-    res = SendMessage(hwnd, MCM_GETMONTHRANGE, GMR_VISIBLE, (LPARAM)st_visible);
+    res = SendMessageA(hwnd, MCM_GETMONTHRANGE, GMR_VISIBLE, (LPARAM)st_visible);
     expect(2, res);
     expect(2000, st_visible[0].wYear);
     expect(11, st_visible[0].wMonth);
@@ -1402,7 +1405,7 @@ static void test_monthrange(void)
     expect(12, st_visible[1].wMonth);
     expect(31, st_visible[1].wDay);
 
-    res = SendMessage(hwnd, MCM_GETMONTHRANGE, GMR_DAYSTATE, (LPARAM)st_daystate);
+    res = SendMessageA(hwnd, MCM_GETMONTHRANGE, GMR_DAYSTATE, (LPARAM)st_daystate);
     expect(4, res);
     expect(2000, st_daystate[0].wYear);
     expect(10, st_daystate[0].wMonth);
@@ -1414,10 +1417,10 @@ static void test_monthrange(void)
     ok_sequence(sequences, MONTHCAL_SEQ_INDEX, monthcal_monthrange_seq, "monthcal monthrange", FALSE);
 
     /* with null date array parameter */
-    res = SendMessage(hwnd, MCM_GETMONTHRANGE, GMR_VISIBLE, 0);
+    res = SendMessageA(hwnd, MCM_GETMONTHRANGE, GMR_VISIBLE, 0);
     expect(2, res);
 
-    res = SendMessage(hwnd, MCM_GETMONTHRANGE, GMR_DAYSTATE, 0);
+    res = SendMessageA(hwnd, MCM_GETMONTHRANGE, GMR_DAYSTATE, 0);
     expect(4, res);
 
     /* resize control to display single Calendar */
@@ -1428,11 +1431,11 @@ static void test_monthrange(void)
     st.wYear  = 1752;
     st.wDay   = 14;
 
-    res = SendMessage(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st);
+    res = SendMessageA(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st);
     expect(1, res);
 
     /* September 1752 has 19 days */
-    res = SendMessage(hwnd, MCM_GETMONTHRANGE, GMR_VISIBLE, (LPARAM)st_visible);
+    res = SendMessageA(hwnd, MCM_GETMONTHRANGE, GMR_VISIBLE, (LPARAM)st_visible);
     expect(1, res);
 
     expect(1752, st_visible[0].wYear);
@@ -1456,59 +1459,59 @@ static void test_maxselday(void)
 
     hwnd = create_monthcal_control(0);
     /* if no style specified default to 1 */
-    res = SendMessage(hwnd, MCM_GETMAXSELCOUNT, 0, 0);
+    res = SendMessageA(hwnd, MCM_GETMAXSELCOUNT, 0, 0);
     expect(1, res);
-    res = SendMessage(hwnd, MCM_SETMAXSELCOUNT, 5, 0);
+    res = SendMessageA(hwnd, MCM_SETMAXSELCOUNT, 5, 0);
     expect(0, res);
-    res = SendMessage(hwnd, MCM_GETMAXSELCOUNT, 0, 0);
+    res = SendMessageA(hwnd, MCM_GETMAXSELCOUNT, 0, 0);
     expect(1, res);
 
     /* try to set style */
-    style = GetWindowLong(hwnd, GWL_STYLE);
-    SetWindowLong(hwnd, GWL_STYLE, style | MCS_MULTISELECT);
-    style = GetWindowLong(hwnd, GWL_STYLE);
+    style = GetWindowLongA(hwnd, GWL_STYLE);
+    SetWindowLongA(hwnd, GWL_STYLE, style | MCS_MULTISELECT);
+    style = GetWindowLongA(hwnd, GWL_STYLE);
     ok(!(style & MCS_MULTISELECT), "Expected MCS_MULTISELECT not to be set\n");
     DestroyWindow(hwnd);
 
     hwnd = create_monthcal_control(MCS_MULTISELECT);
     /* try to remove style */
-    style = GetWindowLong(hwnd, GWL_STYLE);
-    SetWindowLong(hwnd, GWL_STYLE, style & ~MCS_MULTISELECT);
-    style = GetWindowLong(hwnd, GWL_STYLE);
+    style = GetWindowLongA(hwnd, GWL_STYLE);
+    SetWindowLongA(hwnd, GWL_STYLE, style & ~MCS_MULTISELECT);
+    style = GetWindowLongA(hwnd, GWL_STYLE);
     ok(style & MCS_MULTISELECT, "Expected MCS_MULTISELECT to be set\n");
     DestroyWindow(hwnd);
 
     hwnd = create_monthcal_control(MCS_MULTISELECT);
 
     /* default width is a week */
-    res = SendMessage(hwnd, MCM_GETMAXSELCOUNT, 0, 0);
+    res = SendMessageA(hwnd, MCM_GETMAXSELCOUNT, 0, 0);
     expect(7, res);
 
     flush_sequences(sequences, NUM_MSG_SEQUENCES);
 
     /* Setter and Getters for max selected days */
-    res = SendMessage(hwnd, MCM_SETMAXSELCOUNT, 5, 0);
+    res = SendMessageA(hwnd, MCM_SETMAXSELCOUNT, 5, 0);
     expect(1, res);
-    res = SendMessage(hwnd, MCM_GETMAXSELCOUNT, 0, 0);
+    res = SendMessageA(hwnd, MCM_GETMAXSELCOUNT, 0, 0);
     expect(5, res);
 
-    res = SendMessage(hwnd, MCM_SETMAXSELCOUNT, 15, 0);
+    res = SendMessageA(hwnd, MCM_SETMAXSELCOUNT, 15, 0);
     expect(1, res);
-    res = SendMessage(hwnd, MCM_GETMAXSELCOUNT, 0, 0);
+    res = SendMessageA(hwnd, MCM_GETMAXSELCOUNT, 0, 0);
     expect(15, res);
 
     /* test invalid value */
-    res = SendMessage(hwnd, MCM_SETMAXSELCOUNT, -1, 0);
+    res = SendMessageA(hwnd, MCM_SETMAXSELCOUNT, -1, 0);
     expect(0, res);
-    res = SendMessage(hwnd, MCM_GETMAXSELCOUNT, 0, 0);
+    res = SendMessageA(hwnd, MCM_GETMAXSELCOUNT, 0, 0);
     expect(15, res);
 
     ok_sequence(sequences, MONTHCAL_SEQ_INDEX, monthcal_max_sel_day_seq, "monthcal MaxSelDay", FALSE);
 
     /* zero value is invalid too */
-    res = SendMessage(hwnd, MCM_SETMAXSELCOUNT, 0, 0);
+    res = SendMessageA(hwnd, MCM_SETMAXSELCOUNT, 0, 0);
     expect(0, res);
-    res = SendMessage(hwnd, MCM_GETMAXSELCOUNT, 0, 0);
+    res = SendMessageA(hwnd, MCM_GETMAXSELCOUNT, 0, 0);
     expect(15, res);
 
     DestroyWindow(hwnd);
@@ -1533,14 +1536,14 @@ static void test_size(void)
     hFont2 = CreateFontIndirectA(&logfont);
 
     /* initialize to a font we can compare against */
-    SendMessage(hwnd, WM_SETFONT, (WPARAM)hFont1, 0);
-    res = SendMessage(hwnd, MCM_GETMINREQRECT, 0, (LPARAM)&r1);
-    ok(res, "SendMessage(MCM_GETMINREQRECT) failed\n");
+    SendMessageA(hwnd, WM_SETFONT, (WPARAM)hFont1, 0);
+    res = SendMessageA(hwnd, MCM_GETMINREQRECT, 0, (LPARAM)&r1);
+    ok(res, "SendMessageA(MCM_GETMINREQRECT) failed\n");
 
     /* check that setting a larger font results in an larger rect */
-    SendMessage(hwnd, WM_SETFONT, (WPARAM)hFont2, 0);
-    res = SendMessage(hwnd, MCM_GETMINREQRECT, 0, (LPARAM)&r2);
-    ok(res, "SendMessage(MCM_GETMINREQRECT) failed\n");
+    SendMessageA(hwnd, WM_SETFONT, (WPARAM)hFont2, 0);
+    res = SendMessageA(hwnd, MCM_GETMINREQRECT, 0, (LPARAM)&r2);
+    ok(res, "SendMessageA(MCM_GETMINREQRECT) failed\n");
 
     OffsetRect(&r1, -r1.left, -r1.top);
     OffsetRect(&r2, -r2.left, -r2.top);
@@ -1593,11 +1596,11 @@ static void test_selrange(void)
     hwnd = create_monthcal_control(MCS_MULTISELECT);
 
     /* just after creation selection should start and end today */
-    ret = SendMessage(hwnd, MCM_GETTODAY, 0, (LPARAM)&st);
+    ret = SendMessageA(hwnd, MCM_GETTODAY, 0, (LPARAM)&st);
     expect(TRUE, ret);
 
     memset(range, 0xcc, sizeof(range));
-    ret = SendMessage(hwnd, MCM_GETSELRANGE, 0, (LPARAM)range);
+    ret = SendMessageA(hwnd, MCM_GETSELRANGE, 0, (LPARAM)range);
     expect(TRUE, ret);
     expect(st.wYear,      range[0].wYear);
     expect(st.wMonth,     range[0].wMonth);
@@ -1636,10 +1639,10 @@ static void test_selrange(void)
     range[1] = range[0];
     range[1].wDay   = 3;
 
-    ret = SendMessage(hwnd, MCM_SETSELRANGE, 0, (LPARAM)range);
+    ret = SendMessageA(hwnd, MCM_SETSELRANGE, 0, (LPARAM)range);
     expect(TRUE, ret);
 
-    ret = SendMessage(hwnd, MCM_GETSELRANGE, 0, (LPARAM)range2);
+    ret = SendMessageA(hwnd, MCM_GETSELRANGE, 0, (LPARAM)range2);
     expect(TRUE, ret);
 
     expect(range[1].wYear,      range2[0].wYear);
@@ -1667,17 +1670,17 @@ static void test_selrange(void)
     range[0].wDay   = 1;
     range[1] = range[0];
 
-    ret = SendMessage(hwnd, MCM_SETSELRANGE, 0, (LPARAM)range);
+    ret = SendMessageA(hwnd, MCM_SETSELRANGE, 0, (LPARAM)range);
     expect(TRUE, ret);
 
     range[1] = range[0];
     /* default max. range is 7 days */
     range[1].wDay = 8;
 
-    ret = SendMessage(hwnd, MCM_SETSELRANGE, 0, (LPARAM)range);
+    ret = SendMessageA(hwnd, MCM_SETSELRANGE, 0, (LPARAM)range);
     expect(FALSE, ret);
 
-    ret = SendMessage(hwnd, MCM_GETSELRANGE, 0, (LPARAM)range2);
+    ret = SendMessageA(hwnd, MCM_GETSELRANGE, 0, (LPARAM)range2);
     expect(TRUE, ret);
 
     expect(range[0].wYear,  range2[0].wYear);
@@ -1698,16 +1701,16 @@ static void test_killfocus(void)
     hwnd = create_monthcal_control(0);
 
     /* make parent invisible */
-    style = GetWindowLong(parent_wnd, GWL_STYLE);
-    SetWindowLong(parent_wnd, GWL_STYLE, style &~ WS_VISIBLE);
+    style = GetWindowLongA(parent_wnd, GWL_STYLE);
+    SetWindowLongA(parent_wnd, GWL_STYLE, style & ~WS_VISIBLE);
 
-    SendMessage(hwnd, WM_KILLFOCUS, (WPARAM)GetDesktopWindow(), 0);
+    SendMessageA(hwnd, WM_KILLFOCUS, (WPARAM)GetDesktopWindow(), 0);
 
-    style = GetWindowLong(hwnd, GWL_STYLE);
+    style = GetWindowLongA(hwnd, GWL_STYLE);
     ok(style & WS_VISIBLE, "Expected WS_VISIBLE to be set\n");
 
-    style = GetWindowLong(parent_wnd, GWL_STYLE);
-    SetWindowLong(parent_wnd, GWL_STYLE, style | WS_VISIBLE);
+    style = GetWindowLongA(parent_wnd, GWL_STYLE);
+    SetWindowLongA(parent_wnd, GWL_STYLE, style | WS_VISIBLE);
 
     DestroyWindow(hwnd);
 }
@@ -1720,9 +1723,9 @@ static void test_hittest_v6(void)
     RECT r;
 
     hwnd = create_monthcal_control(0);
-    SendMessage(hwnd, MCM_SETCALENDARBORDER, TRUE, 0);
+    SendMessageA(hwnd, MCM_SETCALENDARBORDER, TRUE, 0);
 
-    SendMessage(hwnd, MCM_GETMINREQRECT, 0, (LPARAM)&r);
+    SendMessageA(hwnd, MCM_GETMINREQRECT, 0, (LPARAM)&r);
     /* reserving some area around calendar */
     MoveWindow(hwnd, 0, 0, r.right * 3 / 2, r.bottom * 3 / 2, FALSE);
     mchit.cbSize = sizeof(MCHITTESTINFO);
@@ -1730,7 +1733,7 @@ static void test_hittest_v6(void)
     mchit.iOffset = -1;
     mchit.iRow = -1;
     mchit.iCol = -1;
-    ret = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
+    ret = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
     if (ret == ~0u)
     {
         win_skip("Only MCHITTESTINFO_V1 supported\n");
@@ -1746,7 +1749,7 @@ static void test_hittest_v6(void)
     mchit.pt.x = r.right / 2;
     mchit.pt.y = r.bottom / 2;
     mchit.iOffset = -1;
-    ret = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
+    ret = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
     expect_hex(MCHT_CALENDARDATE, ret);
     expect(0, mchit.iOffset);
 
@@ -1757,7 +1760,7 @@ static void test_hittest_v6(void)
     mchit.iCol = mchit.iRow = -1;
     mchit.uHit = 0;
     mchit.rc.left = mchit.rc.right = mchit.rc.top = mchit.rc.bottom = -1;
-    ret = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
+    ret = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
     expect_hex(MCHT_CALENDARDATE, ret);
     expect_hex(MCHT_CALENDARDATE, mchit.uHit);
     expect(0, mchit.iOffset);
@@ -1774,7 +1777,7 @@ static void test_hittest_v6(void)
     mchit.iCol = mchit.iRow = -1;
     mchit.uHit = 0;
     mchit.rc.left = mchit.rc.right = mchit.rc.top = mchit.rc.bottom = -1;
-    ret = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
+    ret = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
     expect_hex(MCHT_TITLE, ret);
     expect_hex(MCHT_TITLE, mchit.uHit);
     expect(0, mchit.iOffset);
@@ -1793,7 +1796,7 @@ static void test_hittest_v6(void)
     mchit.iCol = mchit.iRow = -2;
     mchit.uHit = ~0;
     mchit.rc.left = mchit.rc.right = mchit.rc.top = mchit.rc.bottom = -1;
-    ret = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
+    ret = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
     todo_wine expect_hex(MCHT_NOWHERE, ret);
     todo_wine expect_hex(MCHT_NOWHERE, mchit.uHit);
     expect(-2, mchit.iOffset);
@@ -1815,10 +1818,10 @@ static void test_get_set_border(void)
     hwnd = create_monthcal_control(0);
 
     /* a non-default value */
-    ret = SendMessage(hwnd, MCM_SETCALENDARBORDER, TRUE, 10);
+    ret = SendMessageA(hwnd, MCM_SETCALENDARBORDER, TRUE, 10);
     expect(0, ret);
 
-    ret = SendMessage(hwnd, MCM_GETCALENDARBORDER, 0, 0);
+    ret = SendMessageA(hwnd, MCM_GETCALENDARBORDER, 0, 0);
 
     if (ret != 10)
     {
@@ -1905,7 +1908,7 @@ static void test_daystate(void)
     /* without MCS_DAYSTATE */
     hwnd = create_monthcal_control(0);
 
-    ret = SendMessage(hwnd, MCM_GETMINREQRECT, 0, (LPARAM)&r);
+    ret = SendMessageA(hwnd, MCM_GETMINREQRECT, 0, (LPARAM)&r);
     expect(TRUE, ret);
 
     /* resize control to display two Calendars */
@@ -1976,23 +1979,23 @@ static void test_sel_notify(void)
     for(i = 0; i < sizeof styles / sizeof styles[0]; i++)
     {
         hwnd = create_monthcal_control(styles[i].val);
-        SetWindowLongPtr(hwnd, GWLP_ID, SEL_NOTIFY_TEST_ID);
+        SetWindowLongPtrA(hwnd, GWLP_ID, SEL_NOTIFY_TEST_ID);
         assert(hwnd);
-        SendMessage(hwnd, MCM_GETMINREQRECT, 0, (LPARAM)&rc);
+        SendMessageA(hwnd, MCM_GETMINREQRECT, 0, (LPARAM)&rc);
         MoveWindow(hwnd, 0, 0, rc.right, rc.bottom, FALSE);
         /* Simulate mouse click on some unselected day to generate
             MCN_SELECT and MCN_SELCHANGE notifications */
         mchit.pt.x = rc.right / 2;
         mchit.pt.y = rc.bottom / 2;
-        SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
-        SendMessage(hwnd, MCM_GETCURSEL, 0, (LPARAM)&st);
+        SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
+        SendMessageA(hwnd, MCM_GETCURSEL, 0, (LPARAM)&st);
         while(st.wDay == mchit.st.wDay) /* Ensure that mchit.pt points to unselected day */
         {
             mchit.pt.y++;
-            SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
+            SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
         }
-        SendMessage(hwnd, WM_LBUTTONDOWN, 0, MAKELPARAM(mchit.pt.x, mchit.pt.y));
-        SendMessage(hwnd, WM_LBUTTONUP, 0, MAKELPARAM(mchit.pt.x, mchit.pt.y));
+        SendMessageA(hwnd, WM_LBUTTONDOWN, 0, MAKELPARAM(mchit.pt.x, mchit.pt.y));
+        SendMessageA(hwnd, WM_LBUTTONUP, 0, MAKELPARAM(mchit.pt.x, mchit.pt.y));
         DestroyWindow(hwnd);
     }
 }
-- 
1.8.3.1



More information about the wine-patches mailing list