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