comctl32: Remove some explicit LPARAM/WPARAM casts.
This commit is contained in:
parent
92e4e63353
commit
9dd502a332
|
@ -173,7 +173,7 @@ static void COMBOEX_DumpInput (COMBOBOXEXITEMW const *input)
|
|||
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 @@ static INT COMBOEX_DeleteItem (const COMBOEX_INFO *infoPtr, INT_PTR index)
|
|||
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 @@ static INT COMBOEX_InsertItemW (COMBOEX_INFO *infoPtr, COMBOBOXEXITEMW const *ci
|
|||
|
||||
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 @@ static LRESULT COMBOEX_Create (HWND hwnd, CREATESTRUCTA const *cs)
|
|||
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 @@ COMBOEX_EditWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
|
|||
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);
|
||||
|
|
|
@ -784,7 +784,7 @@ CreateToolbarEx (HWND hwnd, DWORD style, UINT wID, INT nBitmaps,
|
|||
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 @@ CreateToolbarEx (HWND hwnd, DWORD style, UINT wID, INT nBitmaps,
|
|||
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;
|
||||
|
@ -1404,8 +1403,7 @@ COMCTL32_CreateToolTip(HWND hwndOwner)
|
|||
nmttc.hwndToolTips = hwndToolTip;
|
||||
|
||||
SendMessageW(GetParent(hwndTrueOwner), WM_NOTIFY,
|
||||
(WPARAM)GetWindowLongPtrW(hwndTrueOwner, GWLP_ID),
|
||||
(LPARAM)&nmttc);
|
||||
GetWindowLongPtrW(hwndTrueOwner, GWLP_ID), (LPARAM)&nmttc);
|
||||
}
|
||||
|
||||
return hwndToolTip;
|
||||
|
|
|
@ -334,7 +334,7 @@ INT WINAPI LBItemFromPt (HWND hwndLB, POINT pt, BOOL bAutoScroll)
|
|||
|
||||
dwLastScrollTime = dwScrollTime;
|
||||
|
||||
SendMessageW (hwndLB, LB_SETTOPINDEX, (WPARAM)nIndex, 0);
|
||||
SendMessageW (hwndLB, LB_SETTOPINDEX, nIndex, 0);
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
|
|
@ -374,8 +374,7 @@ HEADER_DrawItem (HEADER_INFO *infoPtr, HDC hdc, INT iItem, BOOL bHotTrack, LRESU
|
|||
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 @@ HEADER_NotifyFormat (HEADER_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
|||
case NF_REQUERY:
|
||||
infoPtr->nNotifyFormat =
|
||||
SendMessageW ((HWND)wParam, WM_NOTIFYFORMAT,
|
||||
(WPARAM)infoPtr->hwndSelf, (LPARAM)NF_QUERY);
|
||||
(WPARAM)infoPtr->hwndSelf, NF_QUERY);
|
||||
return infoPtr->nNotifyFormat;
|
||||
}
|
||||
|
||||
|
|
|
@ -785,8 +785,8 @@ static LRESULT notify_forward_header(const LISTVIEW_INFO *infoPtr, const NMHEADE
|
|||
|
||||
/* 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 @@ static LRESULT notify_forward_header(const LISTVIEW_INFO *infoPtr, const NMHEADE
|
|||
}
|
||||
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 @@ static INT LISTVIEW_CreateHeader(LISTVIEW_INFO *infoPtr)
|
|||
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 @@ static INT LISTVIEW_InsertColumnT(LISTVIEW_INFO *infoPtr, INT nColumn,
|
|||
/* 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 @@ static BOOL LISTVIEW_SetColumnT(const LISTVIEW_INFO *infoPtr, INT nColumn,
|
|||
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 @@ static LRESULT LISTVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
|
|||
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 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
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);
|
||||
|
|
|
@ -1197,7 +1197,7 @@ static BOOL PROPSHEET_CreateTabControl(HWND hwndParent,
|
|||
}
|
||||
|
||||
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);
|
||||
|
||||
|
|
|
@ -233,7 +233,7 @@ STATUSBAR_DrawPart (const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPART
|
|||
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;
|
||||
|
|
|
@ -1764,7 +1764,7 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect
|
|||
/*
|
||||
* 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 @@ static LRESULT TAB_Create (HWND hwnd, LPARAM lParam)
|
|||
nmttc.hwndToolTips = infoPtr->hwndToolTip;
|
||||
|
||||
SendMessageW (infoPtr->hwndNotify, WM_NOTIFY,
|
||||
(WPARAM)GetWindowLongPtrW(hwnd, GWLP_ID), (LPARAM)&nmttc);
|
||||
GetWindowLongPtrW(hwnd, GWLP_ID), (LPARAM)&nmttc);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ static void paint_text (HWND hwnd, HDC hdc, DWORD dwStyle, const COMBOBOXINFO *c
|
|||
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 @@ static void paint_text (HWND hwnd, HDC hdc, DWORD dwStyle, const COMBOBOXINFO *c
|
|||
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.
|
||||
|
|
|
@ -2606,7 +2606,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
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 @@ TOOLBAR_Create (HWND hwnd, const CREATESTRUCTW *lpcs)
|
|||
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 @@ TOOLBAR_LButtonUp (TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
|||
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 */
|
||||
|
|
|
@ -1072,8 +1072,8 @@ TOOLTIPS_AddToolT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW)
|
|||
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");
|
||||
|
|
|
@ -1698,10 +1698,10 @@ TREEVIEW_GetImageList(const TREEVIEW_INFO *infoPtr, WPARAM wParam)
|
|||
|
||||
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 @@ TREEVIEW_SetImageList(TREEVIEW_INFO *infoPtr, WPARAM wParam, HIMAGELIST himlNew)
|
|||
|
||||
switch (wParam)
|
||||
{
|
||||
case (WPARAM)TVSIL_NORMAL:
|
||||
case TVSIL_NORMAL:
|
||||
himlOld = infoPtr->himlNormal;
|
||||
infoPtr->himlNormal = himlNew;
|
||||
|
||||
|
@ -1770,7 +1770,7 @@ TREEVIEW_SetImageList(TREEVIEW_INFO *infoPtr, WPARAM wParam, HIMAGELIST himlNew)
|
|||
|
||||
break;
|
||||
|
||||
case (WPARAM)TVSIL_STATE:
|
||||
case TVSIL_STATE:
|
||||
himlOld = infoPtr->himlState;
|
||||
infoPtr->himlState = himlNew;
|
||||
|
||||
|
@ -3607,12 +3607,12 @@ TREEVIEW_Edit_SubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue