Restore safe reinterpret_casts in MSWindowsClientTaskBarReceiver
This commit is contained in:
parent
19b9be4593
commit
23cf284a66
|
@ -287,7 +287,7 @@ MSWindowsClientTaskBarReceiver::createWindow()
|
|||
MAKEINTRESOURCE(IDD_TASKBAR_STATUS),
|
||||
NULL,
|
||||
(DLGPROC)&MSWindowsClientTaskBarReceiver::staticDlgProc,
|
||||
static_cast<LPARAM>(
|
||||
reinterpret_cast<LPARAM>(
|
||||
static_cast<void*>(this)));
|
||||
|
||||
// window should appear on top of everything, including (especially)
|
||||
|
@ -338,7 +338,7 @@ MSWindowsClientTaskBarReceiver::staticDlgProc(HWND hwnd,
|
|||
MSWindowsClientTaskBarReceiver* self = NULL;
|
||||
if (msg == WM_INITDIALOG) {
|
||||
self = static_cast<MSWindowsClientTaskBarReceiver*>(
|
||||
static_cast<void*>(lParam));
|
||||
reinterpret_cast<void*>(lParam));
|
||||
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR) lParam);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -304,7 +304,7 @@ MSWindowsPortableTaskBarReceiver::createWindow()
|
|||
MAKEINTRESOURCE(IDD_TASKBAR_STATUS),
|
||||
NULL,
|
||||
(DLGPROC)&MSWindowsPortableTaskBarReceiver::staticDlgProc,
|
||||
static_cast<LPARAM>(
|
||||
reinterpret_cast<LPARAM>(
|
||||
static_cast<void*>(this)));
|
||||
|
||||
// window should appear on top of everything, including (especially)
|
||||
|
@ -355,15 +355,15 @@ MSWindowsPortableTaskBarReceiver::staticDlgProc(HWND hwnd,
|
|||
MSWindowsPortableTaskBarReceiver* self = NULL;
|
||||
if (msg == WM_INITDIALOG) {
|
||||
self = static_cast<MSWindowsPortableTaskBarReceiver*>(
|
||||
static_cast<void*>(lParam));
|
||||
reinterpret_cast<void*>(lParam));
|
||||
SetWindowLongPtr(hwnd, GWLP_USERDATA, lParam);
|
||||
}
|
||||
else {
|
||||
// get the extra window data and forward the call
|
||||
LONG data = (LONG)GetWindowLongPtr(hwnd, GWLP_USERDATA);
|
||||
LONG_PTR data = GetWindowLongPtr(hwnd, GWLP_USERDATA);
|
||||
if (data != 0) {
|
||||
self = static_cast<MSWindowsPortableTaskBarReceiver*>(
|
||||
static_cast<void*>(data));
|
||||
reinterpret_cast<void*>(data));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -318,7 +318,7 @@ MSWindowsServerTaskBarReceiver::createWindow()
|
|||
MAKEINTRESOURCE(IDD_TASKBAR_STATUS),
|
||||
NULL,
|
||||
(DLGPROC)&MSWindowsServerTaskBarReceiver::staticDlgProc,
|
||||
static_cast<LPARAM>(
|
||||
reinterpret_cast<LPARAM>(
|
||||
static_cast<void*>(this)));
|
||||
|
||||
// window should appear on top of everything, including (especially)
|
||||
|
@ -369,15 +369,15 @@ MSWindowsServerTaskBarReceiver::staticDlgProc(HWND hwnd,
|
|||
MSWindowsServerTaskBarReceiver* self = NULL;
|
||||
if (msg == WM_INITDIALOG) {
|
||||
self = static_cast<MSWindowsServerTaskBarReceiver*>(
|
||||
static_cast<void*>(lParam));
|
||||
reinterpret_cast<void*>(lParam));
|
||||
SetWindowLongPtr(hwnd, GWLP_USERDATA, lParam);
|
||||
}
|
||||
else {
|
||||
// get the extra window data and forward the call
|
||||
LONG data = (LONG)GetWindowLongPtr(hwnd, GWLP_USERDATA);
|
||||
LONG_PTR data = GetWindowLongPtr(hwnd, GWLP_USERDATA);
|
||||
if (data != 0) {
|
||||
self = static_cast<MSWindowsServerTaskBarReceiver*>(
|
||||
static_cast<void*>(data));
|
||||
reinterpret_cast<void*>(data));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue