comctl32: Remove unneeded casts (1 of 3)
Andrew Talbot
andrew.talbot at talbotville.com
Sat Dec 29 09:37:29 CST 2007
Changelog:
comctl32: Remove unneeded casts.
diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c
index 7fe5676..2c2cd1a 100644
--- a/dlls/comctl32/commctrl.c
+++ b/dlls/comctl32/commctrl.c
@@ -207,7 +207,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hinstDLL);
- COMCTL32_hModule = (HMODULE)hinstDLL;
+ COMCTL32_hModule = hinstDLL;
/* add global subclassing atom (used by 'tooltip' and 'updown') */
COMCTL32_wSubclass = (LPWSTR)(DWORD_PTR)GlobalAddAtomW (strCC32SubclassInfo);
@@ -885,7 +885,7 @@ CreateMappedBitmap (HINSTANCE hInstance, INT_PTR idBitmap, UINT wFlags,
return 0;
RtlMoveMemory (lpBitmapInfo, lpBitmap, nSize);
- pColorTable = (RGBQUAD*)(((LPBYTE)lpBitmapInfo)+(UINT)lpBitmapInfo->biSize);
+ pColorTable = (RGBQUAD*)(((LPBYTE)lpBitmapInfo) + lpBitmapInfo->biSize);
for (iColor = 0; iColor < nColorTableSize; iColor++) {
for (i = 0; i < iMaps; i++) {
@@ -907,8 +907,8 @@ CreateMappedBitmap (HINSTANCE hInstance, INT_PTR idBitmap, UINT wFlags,
}
}
}
- nWidth = (INT)lpBitmapInfo->biWidth;
- nHeight = (INT)lpBitmapInfo->biHeight;
+ nWidth = lpBitmapInfo->biWidth;
+ nHeight = lpBitmapInfo->biHeight;
hdcScreen = GetDC (NULL);
hbm = CreateCompatibleBitmap (hdcScreen, nWidth, nHeight);
if (hbm) {
diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c
index 8689dd5..81f41dd 100644
--- a/dlls/comctl32/datetime.c
+++ b/dlls/comctl32/datetime.c
@@ -1107,8 +1107,8 @@ DATETIME_SendDateTimeChangeNotify (const DATETIME_INFO *infoPtr)
dtdtc.dwFlags = (infoPtr->dwStyle & DTS_SHOWNONE) ? GDT_NONE : GDT_VALID;
MONTHCAL_CopyTime (&infoPtr->date, &dtdtc.st);
- return (BOOL) SendMessageW (infoPtr->hwndNotify, WM_NOTIFY,
- (WPARAM)dtdtc.nmhdr.idFrom, (LPARAM)&dtdtc);
+ return (BOOL) SendMessageW (infoPtr->hwndNotify, WM_NOTIFY,
+ dtdtc.nmhdr.idFrom, (LPARAM)&dtdtc);
}
@@ -1123,7 +1123,7 @@ DATETIME_SendSimpleNotify (const DATETIME_INFO *infoPtr, UINT code)
nmhdr.code = code;
return (BOOL) SendMessageW (infoPtr->hwndNotify, WM_NOTIFY,
- (WPARAM)nmhdr.idFrom, (LPARAM)&nmhdr);
+ nmhdr.idFrom, (LPARAM)&nmhdr);
}
static LRESULT
diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c
index cd144e2..5757f7a 100644
--- a/dlls/comctl32/header.c
+++ b/dlls/comctl32/header.c
@@ -783,7 +783,7 @@ HEADER_SendNotify(HWND hwnd, UINT code, NMHDR *nmhdr)
nmhdr->code = code;
return SendMessageW(infoPtr->hwndNotify, WM_NOTIFY,
- (WPARAM)nmhdr->idFrom, (LPARAM)nmhdr);
+ nmhdr->idFrom, (LPARAM)nmhdr);
}
static BOOL
@@ -909,9 +909,7 @@ HEADER_PrepareCallbackItems(HWND hwnd, INT iItem, INT reqMask)
dispInfo.lParam = lpItem->lParam;
TRACE("Sending HDN_GETDISPINFO%c\n", infoPtr->nNotifyFormat == NFR_UNICODE?'W':'A');
- SendMessageW(infoPtr->hwndNotify, WM_NOTIFY,
- (WPARAM) dispInfo.hdr.idFrom,
- (LPARAM) &dispInfo);
+ SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, dispInfo.hdr.idFrom, (LPARAM)&dispInfo);
TRACE("SendMessage returns(mask:0x%x,str:%s,lParam:%p)\n",
dispInfo.mask,
diff --git a/dlls/comctl32/ipaddress.c b/dlls/comctl32/ipaddress.c
index 76e4101..a9e980b 100644
--- a/dlls/comctl32/ipaddress.c
+++ b/dlls/comctl32/ipaddress.c
@@ -100,8 +100,7 @@ static INT IPADDRESS_IPNotify (const IPADDRESS_INFO *infoPtr, INT field, INT val
nmip.iField = field;
nmip.iValue = value;
- SendMessageW (infoPtr->Notify, WM_NOTIFY,
- (WPARAM)nmip.hdr.idFrom, (LPARAM)&nmip);
+ SendMessageW (infoPtr->Notify, WM_NOTIFY, nmip.hdr.idFrom, (LPARAM)&nmip);
TRACE("<-- %d\n", nmip.iValue);
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 8405d41..3abdd23 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -735,8 +735,7 @@ static LRESULT notify_hdr(const LISTVIEW_INFO *infoPtr, INT code, LPNMHDR pnmh)
pnmh->hwndFrom = infoPtr->hwndSelf;
pnmh->idFrom = GetWindowLongPtrW(infoPtr->hwndSelf, GWLP_ID);
pnmh->code = code;
- result = SendMessageW(infoPtr->hwndNotify, WM_NOTIFY,
- (WPARAM)pnmh->idFrom, (LPARAM)pnmh);
+ result = SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, pnmh->idFrom, (LPARAM)pnmh);
TRACE(" <= %ld\n", result);
diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c
index 0144df5..ccc1abe 100644
--- a/dlls/comctl32/monthcal.c
+++ b/dlls/comctl32/monthcal.c
@@ -1305,8 +1305,7 @@ static void MONTHCAL_GoToNextMonth(MONTHCAL_INFO *infoPtr)
nmds.cDayState = infoPtr->monthRange;
nmds.prgDayState = Alloc(infoPtr->monthRange * sizeof(MONTHDAYSTATE));
- SendMessageW(infoPtr->hwndNotify, WM_NOTIFY,
- (WPARAM)nmds.nmhdr.idFrom, (LPARAM)&nmds);
+ SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, nmds.nmhdr.idFrom, (LPARAM)&nmds);
for(i=0; i<infoPtr->monthRange; i++)
infoPtr->monthdayState[i] = nmds.prgDayState[i];
}
@@ -1336,8 +1335,7 @@ static void MONTHCAL_GoToPrevMonth(MONTHCAL_INFO *infoPtr)
nmds.prgDayState = Alloc
(infoPtr->monthRange * sizeof(MONTHDAYSTATE));
- SendMessageW(infoPtr->hwndNotify, WM_NOTIFY,
- (WPARAM)nmds.nmhdr.idFrom, (LPARAM)&nmds);
+ SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, nmds.nmhdr.idFrom, (LPARAM)&nmds);
for(i=0; i<infoPtr->monthRange; i++)
infoPtr->monthdayState[i] = nmds.prgDayState[i];
}
@@ -1490,10 +1488,10 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
nmsc.nmhdr.code = MCN_SELCHANGE;
MONTHCAL_CopyTime(&infoPtr->minSel, &nmsc.stSelStart);
MONTHCAL_CopyTime(&infoPtr->maxSel, &nmsc.stSelEnd);
- SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, (WPARAM)nmsc.nmhdr.idFrom, (LPARAM)&nmsc);
+ SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, nmsc.nmhdr.idFrom, (LPARAM)&nmsc);
nmsc.nmhdr.code = MCN_SELECT;
- SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, (WPARAM)nmsc.nmhdr.idFrom,(LPARAM)&nmsc);
+ SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, nmsc.nmhdr.idFrom, (LPARAM)&nmsc);
return 0;
}
if(hit == MCHT_CALENDARDATE) {
@@ -1511,8 +1509,7 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
MONTHCAL_CopyTime(&infoPtr->minSel,&nmsc.stSelStart);
MONTHCAL_CopyTime(&infoPtr->maxSel,&nmsc.stSelEnd);
- SendMessageW(infoPtr->hwndNotify, WM_NOTIFY,
- (WPARAM)nmsc.nmhdr.idFrom,(LPARAM)&nmsc);
+ SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, nmsc.nmhdr.idFrom, (LPARAM)&nmsc);
/* redraw both old and new days if the selected day changed */
@@ -1577,7 +1574,7 @@ MONTHCAL_LButtonUp(MONTHCAL_INFO *infoPtr, LPARAM lParam)
nmhdr.code = NM_RELEASEDCAPTURE;
TRACE("Sent notification from %p to %p\n", infoPtr->hwndSelf, infoPtr->hwndNotify);
- SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, (WPARAM)nmhdr.idFrom, (LPARAM)&nmhdr);
+ SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, nmhdr.idFrom, (LPARAM)&nmhdr);
/* redraw if necessary */
if(redraw)
InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
@@ -1589,7 +1586,7 @@ MONTHCAL_LButtonUp(MONTHCAL_INFO *infoPtr, LPARAM lParam)
MONTHCAL_CopyTime(&infoPtr->minSel, &nmsc.stSelStart);
MONTHCAL_CopyTime(&infoPtr->maxSel, &nmsc.stSelEnd);
- SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, (WPARAM)nmsc.nmhdr.idFrom, (LPARAM)&nmsc);
+ SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, nmsc.nmhdr.idFrom, (LPARAM)&nmsc);
}
return 0;
diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c
index f42c937..31d83de 100644
--- a/dlls/comctl32/rebar.c
+++ b/dlls/comctl32/rebar.c
@@ -511,7 +511,7 @@ REBAR_Notify (NMHDR *nmhdr, const REBAR_INFO *infoPtr, UINT code)
TRACE("window %p, code=%08x, via %s\n", parent, code, (infoPtr->bUnicode)?"Unicode":"ANSI");
- return SendMessageW(parent, WM_NOTIFY, (WPARAM)nmhdr->idFrom, (LPARAM)nmhdr);
+ return SendMessageW(parent, WM_NOTIFY, nmhdr->idFrom, (LPARAM)nmhdr);
}
static INT
More information about the wine-patches
mailing list