comctl32: Do not cast NULL.
This commit is contained in:
parent
25f33cb0bc
commit
d4b8948ce3
|
@ -106,7 +106,7 @@ HRESULT WINAPI DPA_LoadStream (HDPA *phDpa, DPALOADPROC loadProc,
|
|||
if (!phDpa || !loadProc || !pStream)
|
||||
return E_INVALIDARG;
|
||||
|
||||
*phDpa = (HDPA)NULL;
|
||||
*phDpa = NULL;
|
||||
|
||||
position.QuadPart = 0;
|
||||
|
||||
|
|
|
@ -8056,7 +8056,7 @@ static LRESULT LISTVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
|
|||
if (!infoPtr->hwndHeader) return -1;
|
||||
|
||||
/* set header unicode format */
|
||||
SendMessageW(infoPtr->hwndHeader, HDM_SETUNICODEFORMAT, (WPARAM)TRUE, (LPARAM)NULL);
|
||||
SendMessageW(infoPtr->hwndHeader, HDM_SETUNICODEFORMAT, TRUE, 0);
|
||||
|
||||
/* set header font */
|
||||
SendMessageW(infoPtr->hwndHeader, WM_SETFONT, (WPARAM)infoPtr->hFont, (LPARAM)TRUE);
|
||||
|
|
|
@ -459,7 +459,7 @@ static BOOL TAB_InternalGetItemRect(
|
|||
static inline BOOL
|
||||
TAB_GetItemRect(const TAB_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
return TAB_InternalGetItemRect(infoPtr, (INT)wParam, (LPRECT)lParam, (LPRECT)NULL);
|
||||
return TAB_InternalGetItemRect(infoPtr, wParam, (LPRECT)lParam, NULL);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
|
|
@ -197,7 +197,7 @@ static void test_dtm_set_format(HWND hWndDateTime)
|
|||
SYSTEMTIME systime;
|
||||
LRESULT r;
|
||||
|
||||
r = SendMessage(hWndDateTime, DTM_SETFORMAT, 0, (LPARAM)NULL);
|
||||
r = SendMessage(hWndDateTime, DTM_SETFORMAT, 0, 0);
|
||||
expect(1, r);
|
||||
|
||||
r = SendMessage(hWndDateTime, DTM_SETFORMAT, 0,
|
||||
|
@ -271,7 +271,7 @@ static void test_dtm_get_monthcal(HWND hWndDateTime)
|
|||
|
||||
todo_wine {
|
||||
r = SendMessage(hWndDateTime, DTM_GETMONTHCAL, 0, 0);
|
||||
ok(r == (LPARAM)NULL, "Expected NULL(no child month calendar control), got %ld\n", r);
|
||||
ok(r == 0, "Expected NULL(no child month calendar control), got %ld\n", r);
|
||||
}
|
||||
|
||||
ok_sequence(sequences, DATETIME_SEQ_INDEX, test_dtm_get_monthcal_seq, "test_dtm_get_monthcal", FALSE);
|
||||
|
|
|
@ -639,7 +639,7 @@ static void test_monthcal_currDate(HWND hwnd)
|
|||
expect(st_original.wSecond, st_new.wSecond);
|
||||
|
||||
/* lparam cannot be NULL */
|
||||
res = SendMessage(hwnd, MCM_GETCURSEL, 0, (LPARAM) NULL);
|
||||
res = SendMessage(hwnd, MCM_GETCURSEL, 0, 0);
|
||||
expect(0, res);
|
||||
|
||||
ok_sequence(sequences, MONTHCAL_SEQ_INDEX, monthcal_curr_date_seq, "monthcal currDate", TRUE);
|
||||
|
|
|
@ -318,7 +318,7 @@ static void test_status_control(void)
|
|||
|
||||
/* Add an icon to the status bar */
|
||||
hIcon = LoadIcon(NULL, IDI_QUESTION);
|
||||
r = SendMessage(hWndStatus, SB_SETICON, 1, (LPARAM) NULL);
|
||||
r = SendMessage(hWndStatus, SB_SETICON, 1, 0);
|
||||
ok(r != 0 ||
|
||||
broken(r == 0), /* win95 */
|
||||
"Expected non-zero, got %d\n", r);
|
||||
|
@ -326,7 +326,7 @@ static void test_status_control(void)
|
|||
ok(r != 0 ||
|
||||
broken(r == 0), /* win95 */
|
||||
"Expected non-zero, got %d\n", r);
|
||||
r = SendMessage(hWndStatus, SB_SETICON, 1, (LPARAM) NULL);
|
||||
r = SendMessage(hWndStatus, SB_SETICON, 1, 0);
|
||||
ok(r != 0 ||
|
||||
broken(r == 0), /* win95 */
|
||||
"Expected non-zero, got %d\n", r);
|
||||
|
|
|
@ -846,7 +846,7 @@ static void test_getters_setters(HWND parent_wnd, INT nTabs)
|
|||
SendMessage(hTab, TCM_SETTOOLTIPS, (LPARAM) toolTip, 0);
|
||||
ok (toolTip == (HWND) SendMessage(hTab,TCM_GETTOOLTIPS,0,0), "ToolTip was set incorrectly.\n");
|
||||
|
||||
SendMessage(hTab, TCM_SETTOOLTIPS, (LPARAM) NULL, 0);
|
||||
SendMessage(hTab, TCM_SETTOOLTIPS, 0, 0);
|
||||
ok (NULL == (HWND) SendMessage(hTab,TCM_GETTOOLTIPS,0,0), "ToolTip was set incorrectly.\n");
|
||||
|
||||
ok_sequence(sequences, TAB_SEQ_INDEX, getset_tooltip_seq, "Getset tooltip test sequence", TRUE);
|
||||
|
|
|
@ -1121,15 +1121,15 @@ static void test_getstring(void)
|
|||
hToolbar = CreateWindowExA(0, TOOLBARCLASSNAME, NULL, WS_CHILD | WS_VISIBLE, 0, 0, 0, 0, hMainWnd, (HMENU)5, GetModuleHandle(NULL), NULL);
|
||||
ok(hToolbar != NULL, "Toolbar creation problem\n");
|
||||
|
||||
r = SendMessage(hToolbar, TB_GETSTRING, MAKEWPARAM(0, 0), (LPARAM)NULL);
|
||||
r = SendMessage(hToolbar, TB_GETSTRING, MAKEWPARAM(0, 0), 0);
|
||||
expect(-1, r);
|
||||
r = SendMessage(hToolbar, TB_GETSTRINGW, MAKEWPARAM(0, 0), (LPARAM)NULL);
|
||||
r = SendMessage(hToolbar, TB_GETSTRINGW, MAKEWPARAM(0, 0), 0);
|
||||
expect(-1, r);
|
||||
r = SendMessage(hToolbar, TB_ADDSTRING, 0, (LPARAM)answer);
|
||||
expect(0, r);
|
||||
r = SendMessage(hToolbar, TB_GETSTRING, MAKEWPARAM(0, 0), (LPARAM)NULL);
|
||||
r = SendMessage(hToolbar, TB_GETSTRING, MAKEWPARAM(0, 0), 0);
|
||||
expect(lstrlenA(answer), r);
|
||||
r = SendMessage(hToolbar, TB_GETSTRINGW, MAKEWPARAM(0, 0), (LPARAM)NULL);
|
||||
r = SendMessage(hToolbar, TB_GETSTRINGW, MAKEWPARAM(0, 0), 0);
|
||||
expect(lstrlenA(answer), r);
|
||||
r = SendMessage(hToolbar, TB_GETSTRING, MAKEWPARAM(sizeof(str), 0), (LPARAM)str);
|
||||
expect(lstrlenA(answer), r);
|
||||
|
|
|
@ -871,7 +871,7 @@ static void test_tool_tips(HWND hWndTrackbar){
|
|||
SendMessage(hWndTrackbar, TBM_SETTOOLTIPS, (LPARAM) hWndTooltip, 0);
|
||||
rTest = (HWND) SendMessage(hWndTrackbar, TBM_GETTOOLTIPS, 0,0);
|
||||
ok(rTest == hWndTooltip, "Expected hWndToolTip, got\n");
|
||||
SendMessage(hWndTrackbar, TBM_SETTOOLTIPS, (LPARAM) NULL, 0);
|
||||
SendMessage(hWndTrackbar, TBM_SETTOOLTIPS, 0, 0);
|
||||
rTest = (HWND) SendMessage(hWndTrackbar, TBM_GETTOOLTIPS, 0,0);
|
||||
ok(rTest == NULL, "Expected NULL\n");
|
||||
SendMessage(hWndTrackbar, TBM_SETTOOLTIPS, (LPARAM) hWndTooltip, 5);
|
||||
|
|
|
@ -5019,7 +5019,7 @@ TREEVIEW_Destroy(TREEVIEW_INFO *infoPtr)
|
|||
CloseThemeData (GetWindowTheme (infoPtr->hwnd));
|
||||
|
||||
/* Deassociate treeview from the window before doing anything drastic. */
|
||||
SetWindowLongPtrW(infoPtr->hwnd, 0, (DWORD_PTR)NULL);
|
||||
SetWindowLongPtrW(infoPtr->hwnd, 0, 0);
|
||||
|
||||
|
||||
DeleteObject(infoPtr->hDefaultFont);
|
||||
|
|
Loading…
Reference in New Issue