mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
comctl32: Remove unneeded casts.
This commit is contained in:
parent
05f38321c4
commit
867f254bec
@ -207,7 +207,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
DisableThreadLibraryCalls(hinstDLL);
|
DisableThreadLibraryCalls(hinstDLL);
|
||||||
|
|
||||||
COMCTL32_hModule = (HMODULE)hinstDLL;
|
COMCTL32_hModule = hinstDLL;
|
||||||
|
|
||||||
/* add global subclassing atom (used by 'tooltip' and 'updown') */
|
/* add global subclassing atom (used by 'tooltip' and 'updown') */
|
||||||
COMCTL32_wSubclass = (LPWSTR)(DWORD_PTR)GlobalAddAtomW (strCC32SubclassInfo);
|
COMCTL32_wSubclass = (LPWSTR)(DWORD_PTR)GlobalAddAtomW (strCC32SubclassInfo);
|
||||||
@ -885,7 +885,7 @@ CreateMappedBitmap (HINSTANCE hInstance, INT_PTR idBitmap, UINT wFlags,
|
|||||||
return 0;
|
return 0;
|
||||||
RtlMoveMemory (lpBitmapInfo, lpBitmap, nSize);
|
RtlMoveMemory (lpBitmapInfo, lpBitmap, nSize);
|
||||||
|
|
||||||
pColorTable = (RGBQUAD*)(((LPBYTE)lpBitmapInfo)+(UINT)lpBitmapInfo->biSize);
|
pColorTable = (RGBQUAD*)(((LPBYTE)lpBitmapInfo) + lpBitmapInfo->biSize);
|
||||||
|
|
||||||
for (iColor = 0; iColor < nColorTableSize; iColor++) {
|
for (iColor = 0; iColor < nColorTableSize; iColor++) {
|
||||||
for (i = 0; i < iMaps; i++) {
|
for (i = 0; i < iMaps; i++) {
|
||||||
@ -907,8 +907,8 @@ CreateMappedBitmap (HINSTANCE hInstance, INT_PTR idBitmap, UINT wFlags,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nWidth = (INT)lpBitmapInfo->biWidth;
|
nWidth = lpBitmapInfo->biWidth;
|
||||||
nHeight = (INT)lpBitmapInfo->biHeight;
|
nHeight = lpBitmapInfo->biHeight;
|
||||||
hdcScreen = GetDC (NULL);
|
hdcScreen = GetDC (NULL);
|
||||||
hbm = CreateCompatibleBitmap (hdcScreen, nWidth, nHeight);
|
hbm = CreateCompatibleBitmap (hdcScreen, nWidth, nHeight);
|
||||||
if (hbm) {
|
if (hbm) {
|
||||||
|
@ -1108,7 +1108,7 @@ DATETIME_SendDateTimeChangeNotify (const DATETIME_INFO *infoPtr)
|
|||||||
|
|
||||||
MONTHCAL_CopyTime (&infoPtr->date, &dtdtc.st);
|
MONTHCAL_CopyTime (&infoPtr->date, &dtdtc.st);
|
||||||
return (BOOL) SendMessageW (infoPtr->hwndNotify, WM_NOTIFY,
|
return (BOOL) SendMessageW (infoPtr->hwndNotify, WM_NOTIFY,
|
||||||
(WPARAM)dtdtc.nmhdr.idFrom, (LPARAM)&dtdtc);
|
dtdtc.nmhdr.idFrom, (LPARAM)&dtdtc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1123,7 +1123,7 @@ DATETIME_SendSimpleNotify (const DATETIME_INFO *infoPtr, UINT code)
|
|||||||
nmhdr.code = code;
|
nmhdr.code = code;
|
||||||
|
|
||||||
return (BOOL) SendMessageW (infoPtr->hwndNotify, WM_NOTIFY,
|
return (BOOL) SendMessageW (infoPtr->hwndNotify, WM_NOTIFY,
|
||||||
(WPARAM)nmhdr.idFrom, (LPARAM)&nmhdr);
|
nmhdr.idFrom, (LPARAM)&nmhdr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
|
@ -783,7 +783,7 @@ HEADER_SendNotify(HWND hwnd, UINT code, NMHDR *nmhdr)
|
|||||||
nmhdr->code = code;
|
nmhdr->code = code;
|
||||||
|
|
||||||
return SendMessageW(infoPtr->hwndNotify, WM_NOTIFY,
|
return SendMessageW(infoPtr->hwndNotify, WM_NOTIFY,
|
||||||
(WPARAM)nmhdr->idFrom, (LPARAM)nmhdr);
|
nmhdr->idFrom, (LPARAM)nmhdr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL
|
static BOOL
|
||||||
@ -909,9 +909,7 @@ HEADER_PrepareCallbackItems(HWND hwnd, INT iItem, INT reqMask)
|
|||||||
dispInfo.lParam = lpItem->lParam;
|
dispInfo.lParam = lpItem->lParam;
|
||||||
|
|
||||||
TRACE("Sending HDN_GETDISPINFO%c\n", infoPtr->nNotifyFormat == NFR_UNICODE?'W':'A');
|
TRACE("Sending HDN_GETDISPINFO%c\n", infoPtr->nNotifyFormat == NFR_UNICODE?'W':'A');
|
||||||
SendMessageW(infoPtr->hwndNotify, WM_NOTIFY,
|
SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, dispInfo.hdr.idFrom, (LPARAM)&dispInfo);
|
||||||
(WPARAM) dispInfo.hdr.idFrom,
|
|
||||||
(LPARAM) &dispInfo);
|
|
||||||
|
|
||||||
TRACE("SendMessage returns(mask:0x%x,str:%s,lParam:%p)\n",
|
TRACE("SendMessage returns(mask:0x%x,str:%s,lParam:%p)\n",
|
||||||
dispInfo.mask,
|
dispInfo.mask,
|
||||||
|
@ -100,8 +100,7 @@ static INT IPADDRESS_IPNotify (const IPADDRESS_INFO *infoPtr, INT field, INT val
|
|||||||
nmip.iField = field;
|
nmip.iField = field;
|
||||||
nmip.iValue = value;
|
nmip.iValue = value;
|
||||||
|
|
||||||
SendMessageW (infoPtr->Notify, WM_NOTIFY,
|
SendMessageW (infoPtr->Notify, WM_NOTIFY, nmip.hdr.idFrom, (LPARAM)&nmip);
|
||||||
(WPARAM)nmip.hdr.idFrom, (LPARAM)&nmip);
|
|
||||||
|
|
||||||
TRACE("<-- %d\n", nmip.iValue);
|
TRACE("<-- %d\n", nmip.iValue);
|
||||||
|
|
||||||
|
@ -735,8 +735,7 @@ static LRESULT notify_hdr(const LISTVIEW_INFO *infoPtr, INT code, LPNMHDR pnmh)
|
|||||||
pnmh->hwndFrom = infoPtr->hwndSelf;
|
pnmh->hwndFrom = infoPtr->hwndSelf;
|
||||||
pnmh->idFrom = GetWindowLongPtrW(infoPtr->hwndSelf, GWLP_ID);
|
pnmh->idFrom = GetWindowLongPtrW(infoPtr->hwndSelf, GWLP_ID);
|
||||||
pnmh->code = code;
|
pnmh->code = code;
|
||||||
result = SendMessageW(infoPtr->hwndNotify, WM_NOTIFY,
|
result = SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, pnmh->idFrom, (LPARAM)pnmh);
|
||||||
(WPARAM)pnmh->idFrom, (LPARAM)pnmh);
|
|
||||||
|
|
||||||
TRACE(" <= %ld\n", result);
|
TRACE(" <= %ld\n", result);
|
||||||
|
|
||||||
|
@ -1305,8 +1305,7 @@ static void MONTHCAL_GoToNextMonth(MONTHCAL_INFO *infoPtr)
|
|||||||
nmds.cDayState = infoPtr->monthRange;
|
nmds.cDayState = infoPtr->monthRange;
|
||||||
nmds.prgDayState = Alloc(infoPtr->monthRange * sizeof(MONTHDAYSTATE));
|
nmds.prgDayState = Alloc(infoPtr->monthRange * sizeof(MONTHDAYSTATE));
|
||||||
|
|
||||||
SendMessageW(infoPtr->hwndNotify, WM_NOTIFY,
|
SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, nmds.nmhdr.idFrom, (LPARAM)&nmds);
|
||||||
(WPARAM)nmds.nmhdr.idFrom, (LPARAM)&nmds);
|
|
||||||
for(i=0; i<infoPtr->monthRange; i++)
|
for(i=0; i<infoPtr->monthRange; i++)
|
||||||
infoPtr->monthdayState[i] = nmds.prgDayState[i];
|
infoPtr->monthdayState[i] = nmds.prgDayState[i];
|
||||||
}
|
}
|
||||||
@ -1336,8 +1335,7 @@ static void MONTHCAL_GoToPrevMonth(MONTHCAL_INFO *infoPtr)
|
|||||||
nmds.prgDayState = Alloc
|
nmds.prgDayState = Alloc
|
||||||
(infoPtr->monthRange * sizeof(MONTHDAYSTATE));
|
(infoPtr->monthRange * sizeof(MONTHDAYSTATE));
|
||||||
|
|
||||||
SendMessageW(infoPtr->hwndNotify, WM_NOTIFY,
|
SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, nmds.nmhdr.idFrom, (LPARAM)&nmds);
|
||||||
(WPARAM)nmds.nmhdr.idFrom, (LPARAM)&nmds);
|
|
||||||
for(i=0; i<infoPtr->monthRange; i++)
|
for(i=0; i<infoPtr->monthRange; i++)
|
||||||
infoPtr->monthdayState[i] = nmds.prgDayState[i];
|
infoPtr->monthdayState[i] = nmds.prgDayState[i];
|
||||||
}
|
}
|
||||||
@ -1490,10 +1488,10 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
|
|||||||
nmsc.nmhdr.code = MCN_SELCHANGE;
|
nmsc.nmhdr.code = MCN_SELCHANGE;
|
||||||
MONTHCAL_CopyTime(&infoPtr->minSel, &nmsc.stSelStart);
|
MONTHCAL_CopyTime(&infoPtr->minSel, &nmsc.stSelStart);
|
||||||
MONTHCAL_CopyTime(&infoPtr->maxSel, &nmsc.stSelEnd);
|
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;
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
if(hit == MCHT_CALENDARDATE) {
|
if(hit == MCHT_CALENDARDATE) {
|
||||||
@ -1511,8 +1509,7 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
|
|||||||
MONTHCAL_CopyTime(&infoPtr->minSel,&nmsc.stSelStart);
|
MONTHCAL_CopyTime(&infoPtr->minSel,&nmsc.stSelStart);
|
||||||
MONTHCAL_CopyTime(&infoPtr->maxSel,&nmsc.stSelEnd);
|
MONTHCAL_CopyTime(&infoPtr->maxSel,&nmsc.stSelEnd);
|
||||||
|
|
||||||
SendMessageW(infoPtr->hwndNotify, WM_NOTIFY,
|
SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, nmsc.nmhdr.idFrom, (LPARAM)&nmsc);
|
||||||
(WPARAM)nmsc.nmhdr.idFrom,(LPARAM)&nmsc);
|
|
||||||
|
|
||||||
|
|
||||||
/* redraw both old and new days if the selected day changed */
|
/* 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;
|
nmhdr.code = NM_RELEASEDCAPTURE;
|
||||||
TRACE("Sent notification from %p to %p\n", infoPtr->hwndSelf, infoPtr->hwndNotify);
|
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 */
|
/* redraw if necessary */
|
||||||
if(redraw)
|
if(redraw)
|
||||||
InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
|
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->minSel, &nmsc.stSelStart);
|
||||||
MONTHCAL_CopyTime(&infoPtr->maxSel, &nmsc.stSelEnd);
|
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;
|
return 0;
|
||||||
|
@ -352,8 +352,7 @@ PAGER_CalcSize (const PAGER_INFO *infoPtr, INT* size, BOOL getWidth)
|
|||||||
nmpgcs.dwFlag = getWidth ? PGF_CALCWIDTH : PGF_CALCHEIGHT;
|
nmpgcs.dwFlag = getWidth ? PGF_CALCWIDTH : PGF_CALCHEIGHT;
|
||||||
nmpgcs.iWidth = getWidth ? *size : 0;
|
nmpgcs.iWidth = getWidth ? *size : 0;
|
||||||
nmpgcs.iHeight = getWidth ? 0 : *size;
|
nmpgcs.iHeight = getWidth ? 0 : *size;
|
||||||
SendMessageW (infoPtr->hwndNotify, WM_NOTIFY,
|
SendMessageW (infoPtr->hwndNotify, WM_NOTIFY, nmpgcs.hdr.idFrom, (LPARAM)&nmpgcs);
|
||||||
(WPARAM)nmpgcs.hdr.idFrom, (LPARAM)&nmpgcs);
|
|
||||||
|
|
||||||
*size = getWidth ? nmpgcs.iWidth : nmpgcs.iHeight;
|
*size = getWidth ? nmpgcs.iWidth : nmpgcs.iHeight;
|
||||||
|
|
||||||
@ -763,8 +762,7 @@ PAGER_Scroll(PAGER_INFO* infoPtr, INT dir)
|
|||||||
}
|
}
|
||||||
nmpgScroll.iScroll -= 2*infoPtr->nButtonSize;
|
nmpgScroll.iScroll -= 2*infoPtr->nButtonSize;
|
||||||
|
|
||||||
SendMessageW (infoPtr->hwndNotify, WM_NOTIFY,
|
SendMessageW (infoPtr->hwndNotify, WM_NOTIFY, nmpgScroll.hdr.idFrom, (LPARAM)&nmpgScroll);
|
||||||
(WPARAM)nmpgScroll.hdr.idFrom, (LPARAM)&nmpgScroll);
|
|
||||||
|
|
||||||
TRACE("[%p] PGN_SCROLL returns iScroll=%d\n", infoPtr->hwndSelf, nmpgScroll.iScroll);
|
TRACE("[%p] PGN_SCROLL returns iScroll=%d\n", infoPtr->hwndSelf, nmpgScroll.iScroll);
|
||||||
|
|
||||||
@ -1076,8 +1074,7 @@ PAGER_MouseMove (PAGER_INFO* infoPtr, INT keys, INT x, INT y)
|
|||||||
nmhdr.hwndFrom = infoPtr->hwndSelf;
|
nmhdr.hwndFrom = infoPtr->hwndSelf;
|
||||||
nmhdr.idFrom = GetWindowLongPtrW(infoPtr->hwndSelf, GWLP_ID);
|
nmhdr.idFrom = GetWindowLongPtrW(infoPtr->hwndSelf, GWLP_ID);
|
||||||
nmhdr.code = NM_RELEASEDCAPTURE;
|
nmhdr.code = NM_RELEASEDCAPTURE;
|
||||||
SendMessageW(infoPtr->hwndNotify, WM_NOTIFY,
|
SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, nmhdr.idFrom, (LPARAM)&nmhdr);
|
||||||
(WPARAM)nmhdr.idFrom, (LPARAM)&nmhdr);
|
|
||||||
}
|
}
|
||||||
if (IsWindow(infoPtr->hwndSelf))
|
if (IsWindow(infoPtr->hwndSelf))
|
||||||
KillTimer(infoPtr->hwndSelf, TIMERID1);
|
KillTimer(infoPtr->hwndSelf, TIMERID1);
|
||||||
|
@ -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");
|
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
|
static INT
|
||||||
|
@ -1314,7 +1314,7 @@ static LRESULT SYSLINK_SendParentNotify (const SYSLINK_INFO *infoPtr, UINT code,
|
|||||||
nml.item.szUrl[0] = 0;
|
nml.item.szUrl[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return SendMessageW(infoPtr->Notify, WM_NOTIFY, (WPARAM)nml.hdr.idFrom, (LPARAM)&nml);
|
return SendMessageW(infoPtr->Notify, WM_NOTIFY, nml.hdr.idFrom, (LPARAM)&nml);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -627,7 +627,7 @@ static void UPDOWN_DoAction (UPDOWN_INFO *infoPtr, int delta, int action)
|
|||||||
ni.hdr.hwndFrom = infoPtr->Self;
|
ni.hdr.hwndFrom = infoPtr->Self;
|
||||||
ni.hdr.idFrom = GetWindowLongPtrW (infoPtr->Self, GWLP_ID);
|
ni.hdr.idFrom = GetWindowLongPtrW (infoPtr->Self, GWLP_ID);
|
||||||
ni.hdr.code = UDN_DELTAPOS;
|
ni.hdr.code = UDN_DELTAPOS;
|
||||||
if (!SendMessageW(infoPtr->Notify, WM_NOTIFY, (WPARAM)ni.hdr.idFrom, (LPARAM)&ni)) {
|
if (!SendMessageW(infoPtr->Notify, WM_NOTIFY, ni.hdr.idFrom, (LPARAM)&ni)) {
|
||||||
/* Parent said: OK to adjust */
|
/* Parent said: OK to adjust */
|
||||||
|
|
||||||
/* Now adjust value with (maybe new) delta */
|
/* Now adjust value with (maybe new) delta */
|
||||||
|
Loading…
Reference in New Issue
Block a user