comctl32: Remove some explicit LPARAM/WPARAM casts.
diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c index 14079b2..e1d2cd4 100644 --- a/dlls/comctl32/comboex.c +++ b/dlls/comctl32/comboex.c
@@ -173,7 +173,7 @@ static inline CBE_ITEMDATA *get_item_data(const COMBOEX_INFO *infoPtr, INT index) { return (CBE_ITEMDATA *)SendMessageW (infoPtr->hwndCombo, CB_GETITEMDATA, - (WPARAM)index, 0); + index, 0); } static inline cmp_func_t get_cmp_func(COMBOEX_INFO const *infoPtr) @@ -533,7 +533,7 @@ if (!COMBOEX_FindItem(infoPtr, index)) return CB_ERR; /* doing this will result in WM_DELETEITEM being issued */ - SendMessageW (infoPtr->hwndCombo, CB_DELETESTRING, (WPARAM)index, 0); + SendMessageW (infoPtr->hwndCombo, CB_DELETESTRING, index, 0); return infoPtr->nb_items; } @@ -674,8 +674,7 @@ if (TRACE_ON(comboex)) COMBOEX_DumpItem (item); - SendMessageW (infoPtr->hwndCombo, CB_INSERTSTRING, - (WPARAM)cit->iItem, (LPARAM)item); + SendMessageW (infoPtr->hwndCombo, CB_INSERTSTRING, cit->iItem, (LPARAM)item); memset (&nmcit.ceItem, 0, sizeof(nmcit.ceItem)); COMBOEX_CopyItem (item, &nmcit.ceItem); @@ -1066,7 +1065,7 @@ SendMessageW (infoPtr->hwndCombo, WM_SETFONT, (WPARAM)infoPtr->font, 0); if (infoPtr->hwndEdit) { SendMessageW (infoPtr->hwndEdit, WM_SETFONT, (WPARAM)infoPtr->font, 0); - SendMessageW (infoPtr->hwndEdit, EM_SETMARGINS, (WPARAM)EC_USEFONTINFO, 0); + SendMessageW (infoPtr->hwndEdit, EM_SETMARGINS, EC_USEFONTINFO, 0); } COMBOEX_ReSize (infoPtr); @@ -1849,8 +1848,7 @@ oldItem = SendMessageW (infoPtr->hwndCombo,CB_GETCURSEL, 0, 0); if (oldItem != -1) { /* if something is selected, then deselect it */ - SendMessageW (infoPtr->hwndCombo, CB_SETCURSEL, - (WPARAM)-1, 0); + SendMessageW (infoPtr->hwndCombo, CB_SETCURSEL, -1, 0); } InvalidateRect (infoPtr->hwndCombo, 0, 0); SetFocus(infoPtr->hwndEdit);
diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index db0eade..1283bad 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c
@@ -784,7 +784,7 @@ if(hwndTB) { TBADDBITMAP tbab; - SendMessageW (hwndTB, TB_BUTTONSTRUCTSIZE, (WPARAM)uStructSize, 0); + SendMessageW (hwndTB, TB_BUTTONSTRUCTSIZE, uStructSize, 0); /* set bitmap and button size */ /*If CreateToolbarEx receives 0, windows sets default values*/ @@ -811,12 +811,11 @@ tbab.hInst = hBMInst; tbab.nID = wBMID; - SendMessageW (hwndTB, TB_ADDBITMAP, (WPARAM)nBitmaps, (LPARAM)&tbab); + SendMessageW (hwndTB, TB_ADDBITMAP, nBitmaps, (LPARAM)&tbab); } /* add buttons */ if(iNumButtons > 0) - SendMessageW (hwndTB, TB_ADDBUTTONSW, - (WPARAM)iNumButtons, (LPARAM)lpButtons); + SendMessageW (hwndTB, TB_ADDBUTTONSW, iNumButtons, (LPARAM)lpButtons); } return hwndTB; @@ -1403,9 +1402,8 @@ nmttc.hdr.code = NM_TOOLTIPSCREATED; nmttc.hwndToolTips = hwndToolTip; - SendMessageW(GetParent(hwndTrueOwner), WM_NOTIFY, - (WPARAM)GetWindowLongPtrW(hwndTrueOwner, GWLP_ID), - (LPARAM)&nmttc); + SendMessageW(GetParent(hwndTrueOwner), WM_NOTIFY, + GetWindowLongPtrW(hwndTrueOwner, GWLP_ID), (LPARAM)&nmttc); } return hwndToolTip;
diff --git a/dlls/comctl32/draglist.c b/dlls/comctl32/draglist.c index 9ecade5..2097edb 100644 --- a/dlls/comctl32/draglist.c +++ b/dlls/comctl32/draglist.c
@@ -334,7 +334,7 @@ dwLastScrollTime = dwScrollTime; - SendMessageW (hwndLB, LB_SETTOPINDEX, (WPARAM)nIndex, 0); + SendMessageW (hwndLB, LB_SETTOPINDEX, nIndex, 0); } return -1;
diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c index dce1d8c..d916c72 100644 --- a/dlls/comctl32/header.c +++ b/dlls/comctl32/header.c
@@ -374,8 +374,7 @@ dis.rcItem = phdi->rect; dis.itemData = phdi->lParam; oldBkMode = SetBkMode(hdc, TRANSPARENT); - SendMessageW (infoPtr->hwndNotify, WM_DRAWITEM, - (WPARAM)dis.CtlID, (LPARAM)&dis); + SendMessageW (infoPtr->hwndNotify, WM_DRAWITEM, dis.CtlID, (LPARAM)&dis); if (oldBkMode != TRANSPARENT) SetBkMode(hdc, oldBkMode); } @@ -1748,7 +1747,7 @@ case NF_REQUERY: infoPtr->nNotifyFormat = SendMessageW ((HWND)wParam, WM_NOTIFYFORMAT, - (WPARAM)infoPtr->hwndSelf, (LPARAM)NF_QUERY); + (WPARAM)infoPtr->hwndSelf, NF_QUERY); return infoPtr->nNotifyFormat; }
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 3d32708..cf7c77a 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c
@@ -785,8 +785,8 @@ /* on unicode format exit earlier */ if (infoPtr->notifyFormat == NFR_UNICODE) - return SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, - (WPARAM)lpnmh->hdr.idFrom, (LPARAM)lpnmh); + return SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, lpnmh->hdr.idFrom, + (LPARAM)lpnmh); /* header always supplies unicode notifications, all we have to do is to convert strings to ANSI */ @@ -815,8 +815,8 @@ } nmhA.hdr.code = get_ansi_notification(lpnmh->hdr.code); - ret = SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, - (WPARAM)nmhA.hdr.idFrom, (LPARAM)&nmhA); + ret = SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, nmhA.hdr.idFrom, + (LPARAM)&nmhA); /* cleanup */ Free(text); @@ -1575,7 +1575,7 @@ SendMessageW(infoPtr->hwndHeader, HDM_SETUNICODEFORMAT, TRUE, 0); /* set header font */ - SendMessageW(infoPtr->hwndHeader, WM_SETFONT, (WPARAM)infoPtr->hFont, (LPARAM)TRUE); + SendMessageW(infoPtr->hwndHeader, WM_SETFONT, (WPARAM)infoPtr->hFont, TRUE); LISTVIEW_UpdateSize(infoPtr); @@ -7846,7 +7846,7 @@ /* insert item in header control */ nNewColumn = SendMessageW(infoPtr->hwndHeader, isW ? HDM_INSERTITEMW : HDM_INSERTITEMA, - (WPARAM)nColumn, (LPARAM)&hdi); + nColumn, (LPARAM)&hdi); if (nNewColumn == -1) return -1; if (nNewColumn != nColumn) ERR("nColumn=%d, nNewColumn=%d\n", nColumn, nNewColumn); @@ -7929,7 +7929,7 @@ column_fill_hditem(infoPtr, &hdi, nColumn, lpColumn, isW); /* set header item attributes */ - bResult = SendMessageW(infoPtr->hwndHeader, isW ? HDM_SETITEMW : HDM_SETITEMA, (WPARAM)nColumn, (LPARAM)&hdi); + bResult = SendMessageW(infoPtr->hwndHeader, isW ? HDM_SETITEMW : HDM_SETITEMA, nColumn, (LPARAM)&hdi); if (!bResult) return FALSE; if (lpColumn->mask & LVCF_FMT) @@ -9142,7 +9142,7 @@ map_style_view(infoPtr); infoPtr->notifyFormat = SendMessageW(infoPtr->hwndNotify, WM_NOTIFYFORMAT, - (WPARAM)infoPtr->hwndSelf, (LPARAM)NF_QUERY); + (WPARAM)infoPtr->hwndSelf, NF_QUERY); /* on error defaulting to ANSI notifications */ if (infoPtr->notifyFormat == 0) infoPtr->notifyFormat = NFR_ANSI; @@ -11214,7 +11214,7 @@ case LVM_SORTITEMS: case LVM_SORTITEMSEX: - return LISTVIEW_SortItems(infoPtr, (PFNLVCOMPARE)lParam, (LPARAM)wParam, + return LISTVIEW_SortItems(infoPtr, (PFNLVCOMPARE)lParam, wParam, uMsg == LVM_SORTITEMSEX); case LVM_SUBITEMHITTEST: return LISTVIEW_HitTest(infoPtr, (LPLVHITTESTINFO)lParam, TRUE, FALSE);
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index 5aef0e1..ed572df 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c
@@ -1197,7 +1197,7 @@ } item.pszText = (LPWSTR) psInfo->proppage[i].pszText; - SendMessageW(hwndTabCtrl, TCM_INSERTITEMW, (WPARAM)i, (LPARAM)&item); + SendMessageW(hwndTabCtrl, TCM_INSERTITEMW, i, (LPARAM)&item); } SendMessageW(GetDlgItem(hwndTabCtrl, IDC_TABCONTROL), WM_SETREDRAW, 1, 0);
diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c index d6b627a..cc29990 100644 --- a/dlls/comctl32/status.c +++ b/dlls/comctl32/status.c
@@ -233,7 +233,7 @@ dis.hDC = hdc; dis.rcItem = r; dis.itemData = (ULONG_PTR)part->text; - SendMessageW (infoPtr->Notify, WM_DRAWITEM, (WPARAM)dis.CtlID, (LPARAM)&dis); + SendMessageW (infoPtr->Notify, WM_DRAWITEM, dis.CtlID, (LPARAM)&dis); } else { if (part->hIcon) { INT cy = r.bottom - r.top;
diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c index 35985f8..c99153e 100644 --- a/dlls/comctl32/tab.c +++ b/dlls/comctl32/tab.c
@@ -1764,7 +1764,7 @@ /* * send the draw message */ - SendMessageW( infoPtr->hwndNotify, WM_DRAWITEM, (WPARAM)id, (LPARAM)&dis ); + SendMessageW( infoPtr->hwndNotify, WM_DRAWITEM, id, (LPARAM)&dis ); } else { @@ -3100,7 +3100,7 @@ nmttc.hwndToolTips = infoPtr->hwndToolTip; SendMessageW (infoPtr->hwndNotify, WM_NOTIFY, - (WPARAM)GetWindowLongPtrW(hwnd, GWLP_ID), (LPARAM)&nmttc); + GetWindowLongPtrW(hwnd, GWLP_ID), (LPARAM)&nmttc); } }
diff --git a/dlls/comctl32/theme_combo.c b/dlls/comctl32/theme_combo.c index 477138e..a6c6f87 100644 --- a/dlls/comctl32/theme_combo.c +++ b/dlls/comctl32/theme_combo.c
@@ -69,7 +69,7 @@ if( (pText = HeapAlloc( GetProcessHeap(), 0, (size + 1) * sizeof(WCHAR))) ) { /* size from LB_GETTEXTLEN may be too large, from LB_GETTEXT is accurate */ - size=SendMessageW (cbi->hwndList, LB_GETTEXT, (WPARAM)id, (LPARAM)pText); + size = SendMessageW (cbi->hwndList, LB_GETTEXT, id, (LPARAM)pText); pText[size] = '\0'; /* just in case */ } else return; } @@ -116,8 +116,7 @@ dis.itemState = itemState; dis.hDC = hdc; dis.rcItem = rectEdit; - dis.itemData = SendMessageW(cbi->hwndList, LB_GETITEMDATA, - (WPARAM)id, 0 ); + dis.itemData = SendMessageW(cbi->hwndList, LB_GETITEMDATA, id, 0); /* * Clip the DC and have the parent draw the item.
diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 836b864..597708a 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c
@@ -2606,7 +2606,7 @@ COLORREF oldBk = 0; /* get item data */ - btnInfo = (PCUSTOMBUTTON)SendDlgItemMessageW (hwnd, wParam, LB_GETITEMDATA, (WPARAM)lpdis->itemID, 0); + btnInfo = (PCUSTOMBUTTON)SendDlgItemMessageW (hwnd, wParam, LB_GETITEMDATA, lpdis->itemID, 0); if (btnInfo == NULL) { FIXME("btnInfo invalid!\n"); @@ -5142,7 +5142,7 @@ infoPtr->dwStyle = dwStyle; GetClientRect(hwnd, &infoPtr->client_rect); infoPtr->bUnicode = infoPtr->hwndNotify && - (NFR_UNICODE == SendMessageW(hwnd, WM_NOTIFYFORMAT, (WPARAM)hwnd, (LPARAM)NF_REQUERY)); + (NFR_UNICODE == SendMessageW(hwnd, WM_NOTIFYFORMAT, (WPARAM)hwnd, NF_REQUERY)); infoPtr->hwndToolTip = NULL; /* if needed the tooltip control will be created after a WM_MOUSEMOVE */ SystemParametersInfoW (SPI_GETICONTITLELOGFONT, 0, &logFont, 0); @@ -5589,7 +5589,7 @@ else { TRACE("button %d dragged out of toolbar\n", infoPtr->nButtonDrag); - TOOLBAR_DeleteButton(infoPtr, (WPARAM)infoPtr->nButtonDrag); + TOOLBAR_DeleteButton(infoPtr, infoPtr->nButtonDrag); } /* button under cursor changed so need to re-set hot item */
diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c index dba5b3f..083dd07 100644 --- a/dlls/comctl32/tooltips.c +++ b/dlls/comctl32/tooltips.c
@@ -1072,8 +1072,8 @@ TRACE("subclassing installed!\n"); } - nResult = (INT) SendMessageW (toolPtr->hwnd, WM_NOTIFYFORMAT, - (WPARAM)infoPtr->hwndSelf, (LPARAM)NF_QUERY); + nResult = SendMessageW (toolPtr->hwnd, WM_NOTIFYFORMAT, + (WPARAM)infoPtr->hwndSelf, NF_QUERY); if (nResult == NFR_ANSI) { toolPtr->bNotifyUnicode = FALSE; TRACE(" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n");
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 51af5aa..8eb0c6d 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c
@@ -1698,10 +1698,10 @@ switch (wParam) { - case (WPARAM)TVSIL_NORMAL: + case TVSIL_NORMAL: return (LRESULT)infoPtr->himlNormal; - case (WPARAM)TVSIL_STATE: + case TVSIL_STATE: return (LRESULT)infoPtr->himlState; default: @@ -1755,7 +1755,7 @@ switch (wParam) { - case (WPARAM)TVSIL_NORMAL: + case TVSIL_NORMAL: himlOld = infoPtr->himlNormal; infoPtr->himlNormal = himlNew; @@ -1770,7 +1770,7 @@ break; - case (WPARAM)TVSIL_STATE: + case TVSIL_STATE: himlOld = infoPtr->himlState; infoPtr->himlState = himlNew; @@ -3607,12 +3607,12 @@ return DLGC_WANTARROWS | DLGC_WANTALLKEYS; case WM_KEYDOWN: - if (wParam == (WPARAM)VK_ESCAPE) + if (wParam == VK_ESCAPE) { bCancel = TRUE; break; } - else if (wParam == (WPARAM)VK_RETURN) + else if (wParam == VK_RETURN) { break; }