Commit 62e17fa8 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

comctl32: Do not cast zero.

parent 90024d03
......@@ -431,10 +431,9 @@ static void COMBOEX_ReSize (COMBOEX_INFO *infoPtr)
cy = max (iinfo.rcImage.bottom - iinfo.rcImage.top, cy);
TRACE("upgraded height due to image: height=%d\n", cy);
}
SendMessageW (infoPtr->hwndSelf, CB_SETITEMHEIGHT, (WPARAM)-1, (LPARAM)cy);
SendMessageW (infoPtr->hwndSelf, CB_SETITEMHEIGHT, -1, cy);
if (infoPtr->hwndCombo) {
SendMessageW (infoPtr->hwndCombo, CB_SETITEMHEIGHT,
(WPARAM) 0, (LPARAM) cy);
SendMessageW (infoPtr->hwndCombo, CB_SETITEMHEIGHT, 0, cy);
if ( !(infoPtr->flags & CBES_EX_NOSIZELIMIT)) {
RECT comboRect;
if (GetWindowRect(infoPtr->hwndCombo, &comboRect)) {
......
......@@ -1393,7 +1393,7 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
if (infoPtr->hWndYearUpDown)
{
infoPtr->currentYear=SendMessageW( infoPtr->hWndYearUpDown, UDM_SETPOS, (WPARAM) 0,(LPARAM)0);
infoPtr->currentYear=SendMessageW(infoPtr->hWndYearUpDown, UDM_SETPOS, 0, 0);
if(!DestroyWindow(infoPtr->hWndYearUpDown))
{
FIXME("Can't destroy Updown Control\n");
......@@ -1474,9 +1474,9 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
NULL,
NULL,
NULL);
SendMessageW( infoPtr->hWndYearUpDown, UDM_SETRANGE, (WPARAM) 0, MAKELONG (9999, 1753));
SendMessageW( infoPtr->hWndYearUpDown, UDM_SETBUDDY, (WPARAM) infoPtr->hWndYearEdit, (LPARAM)0 );
SendMessageW( infoPtr->hWndYearUpDown, UDM_SETPOS, (WPARAM) 0,(LPARAM)infoPtr->currentYear );
SendMessageW(infoPtr->hWndYearUpDown, UDM_SETRANGE, 0, MAKELONG (9999, 1753));
SendMessageW(infoPtr->hWndYearUpDown, UDM_SETBUDDY, (WPARAM) infoPtr->hWndYearEdit, 0);
SendMessageW(infoPtr->hWndYearUpDown, UDM_SETPOS, 0, infoPtr->currentYear);
return 0;
}
......
......@@ -3479,8 +3479,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
if (psInfo->useCallback)
(*(psInfo->ppshheader.pfnCallback))(hwnd,
PSCB_INITIALIZED, (LPARAM)0);
(*(psInfo->ppshheader.pfnCallback))(hwnd, PSCB_INITIALIZED, 0);
idx = psInfo->active_page;
psInfo->active_page = -1;
......
......@@ -304,11 +304,11 @@ static LONG getItem(HWND hdex, int idx, LPSTR textBuffer)
static void addReadDelItem(HWND hdex, HDITEMA *phdiCreate, int maskRead, HDITEMA *phdiRead)
{
ok(SendMessage(hdex, HDM_INSERTITEMA, (WPARAM)0, (LPARAM)phdiCreate)!=-1, "Adding item failed\n");
ok(SendMessage(hdex, HDM_INSERTITEMA, 0, (LPARAM)phdiCreate)!=-1, "Adding item failed\n");
ZeroMemory(phdiRead, sizeof(HDITEMA));
phdiRead->mask = maskRead;
ok(SendMessage(hdex, HDM_GETITEMA, (WPARAM)0, (LPARAM)phdiRead)!=0, "Getting item data failed\n");
ok(SendMessage(hdex, HDM_DELETEITEM, (WPARAM)0, (LPARAM)0)!=0, "Deleting item failed\n");
ok(SendMessage(hdex, HDM_GETITEMA, 0, (LPARAM)phdiRead)!=0, "Getting item data failed\n");
ok(SendMessage(hdex, HDM_DELETEITEM, 0, 0)!=0, "Deleting item failed\n");
}
static HWND create_header_control (void)
......@@ -661,24 +661,24 @@ static void check_mask(void)
hdi.iOrder = 0;
hdi.lParam = 17;
hdi.cchTextMax = 260;
ret = SendMessage(hWndHeader, HDM_INSERTITEM, (WPARAM)0, (LPARAM)&hdi);
ret = SendMessage(hWndHeader, HDM_INSERTITEM, 0, (LPARAM)&hdi);
ok(ret == -1, "Creating an item with a zero mask should have failed\n");
if (ret != -1) SendMessage(hWndHeader, HDM_DELETEITEM, (WPARAM)0, (LPARAM)0);
if (ret != -1) SendMessage(hWndHeader, HDM_DELETEITEM, 0, 0);
/* with a non-zero mask creation will succeed */
ZeroMemory(&hdi, sizeof(hdi));
hdi.mask = HDI_LPARAM;
ret = SendMessage(hWndHeader, HDM_INSERTITEM, (WPARAM)0, (LPARAM)&hdi);
ret = SendMessage(hWndHeader, HDM_INSERTITEM, 0, (LPARAM)&hdi);
ok(ret != -1, "Adding item with non-zero mask failed\n");
if (ret != -1)
SendMessage(hWndHeader, HDM_DELETEITEM, (WPARAM)0, (LPARAM)0);
SendMessage(hWndHeader, HDM_DELETEITEM, 0, 0);
/* in SETITEM if the mask contains a unknown bit, it is ignored */
ZeroMemory(&hdi, sizeof(hdi));
hdi.mask = 0x08000000 | HDI_LPARAM | HDI_IMAGE;
hdi.lParam = 133;
hdi.iImage = 17;
ret = SendMessage(hWndHeader, HDM_INSERTITEM, (WPARAM)0, (LPARAM)&hdi);
ret = SendMessage(hWndHeader, HDM_INSERTITEM, 0, (LPARAM)&hdi);
ok(ret != -1, "Adding item failed\n");
if (ret != -1)
......@@ -686,18 +686,18 @@ static void check_mask(void)
/* check result */
ZeroMemory(&hdi, sizeof(hdi));
hdi.mask = HDI_LPARAM | HDI_IMAGE;
SendMessage(hWndHeader, HDM_GETITEM, (WPARAM)0, (LPARAM)&hdi);
SendMessage(hWndHeader, HDM_GETITEM, 0, (LPARAM)&hdi);
ok(hdi.lParam == 133, "comctl32 4.0 field not set\n");
ok(hdi.iImage == 17, "comctl32 >4.0 field not set\n");
/* but in GETITEM if an unknown bit is set, comctl32 uses only version 4.0 fields */
ZeroMemory(&hdi, sizeof(hdi));
hdi.mask = 0x08000000 | HDI_LPARAM | HDI_IMAGE;
SendMessage(hWndHeader, HDM_GETITEM, (WPARAM)0, (LPARAM)&hdi);
SendMessage(hWndHeader, HDM_GETITEM, 0, (LPARAM)&hdi);
ok(hdi.lParam == 133, "comctl32 4.0 field not read\n");
ok(hdi.iImage == 0, "comctl32 >4.0 field shouldn't be read\n");
SendMessage(hWndHeader, HDM_DELETEITEM, (WPARAM)0, (LPARAM)0);
SendMessage(hWndHeader, HDM_DELETEITEM, 0, 0);
}
}
......
......@@ -347,8 +347,8 @@ static void test_status_control(void)
expect(TRUE,r);
/* Set the minimum height and get rectangle information again */
SendMessage(hWndStatus, SB_SETMINHEIGHT, 50, (LPARAM) 0);
r = SendMessage(hWndStatus, WM_SIZE, 0, (LPARAM) 0);
SendMessage(hWndStatus, SB_SETMINHEIGHT, 50, 0);
r = SendMessage(hWndStatus, WM_SIZE, 0, 0);
expect(0,r);
r = SendMessage(hWndStatus, SB_GETRECT, 0, (LPARAM)&rc);
expect(TRUE,r);
......
......@@ -114,7 +114,7 @@ static void basic_test(void)
WS_VISIBLE | WS_CLIPCHILDREN | CCS_TOP |
WS_CHILD | TBSTYLE_LIST,
100,
0, NULL, (UINT)0,
0, NULL, 0,
buttons, sizeof(buttons)/sizeof(buttons[0]),
0, 0, 20, 16, sizeof(TBBUTTON));
ok(hToolbar != NULL, "Toolbar creation\n");
......@@ -1084,7 +1084,7 @@ static void test_setrows(void)
WS_VISIBLE | WS_CLIPCHILDREN | WS_CHILD | CCS_NORESIZE | CCS_NOPARENTALIGN
| CCS_NOMOVEY | CCS_TOP,
0,
0, NULL, (UINT)0,
0, NULL, 0,
buttons, sizeof(buttons)/sizeof(buttons[0]),
20, 20, 0, 0, sizeof(TBBUTTON));
ok(hToolbar != NULL, "Toolbar creation\n");
......
......@@ -5177,7 +5177,7 @@ TOOLBAR_SetVersion (HWND hwnd, INT iVersion)
infoPtr->iVersion = iVersion;
if (infoPtr->iVersion >= 5)
TOOLBAR_SetUnicodeFormat(hwnd, (WPARAM)TRUE, (LPARAM)0);
TOOLBAR_SetUnicodeFormat(hwnd, TRUE, 0);
return iOldVersion;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment