diff --git a/src/ui/windows7thumbbar.cpp b/src/ui/windows7thumbbar.cpp index 4eb754e40..b8fbdecb6 100644 --- a/src/ui/windows7thumbbar.cpp +++ b/src/ui/windows7thumbbar.cpp @@ -53,10 +53,13 @@ void Windows7ThumbBar::SetActions(const QList& actions) { } #ifdef Q_OS_WIN32 + +extern HICON qt_pixmapToWinHICON(const QPixmap &p); + static void SetupButton(const QAction* action, THUMBBUTTON* button) { if (action) { button->hIcon = - action->icon().pixmap(Windows7ThumbBar::kIconSize).toWinHICON(); + qt_pixmapToWinHICON(action->icon().pixmap(Windows7ThumbBar::kIconSize)); button->dwFlags = action->isEnabled() ? THBF_ENABLED : THBF_DISABLED; // This is unsafe - doesn't obey 260-char restriction action->text().toWCharArray(button->szTip); @@ -130,7 +133,7 @@ void Windows7ThumbBar::HandleWinEvent(MSG* msg) { } qLog(Debug) << "Adding buttons"; - hr = taskbar_list->ThumbBarAddButtons(widget_->winId(), actions_.count(), + hr = taskbar_list->ThumbBarAddButtons((HWND)widget_->winId(), actions_.count(), buttons); if (hr != S_OK) qLog(Debug) << "Failed to add buttons" << hex << DWORD(hr); for (int i = 0; i < actions_.count(); i++) { @@ -164,7 +167,7 @@ void Windows7ThumbBar::ActionChanged() { if (buttons->hIcon > 0) DestroyIcon(buttons->hIcon); } - taskbar_list->ThumbBarUpdateButtons(widget_->winId(), actions_.count(), + taskbar_list->ThumbBarUpdateButtons((HWND)widget_->winId(), actions_.count(), buttons); #endif // Q_OS_WIN32 } diff --git a/src/widgets/osdpretty.cpp b/src/widgets/osdpretty.cpp index 0440b6a3f..6c2241cac 100644 --- a/src/widgets/osdpretty.cpp +++ b/src/widgets/osdpretty.cpp @@ -76,9 +76,9 @@ OSDPretty::OSDPretty(Mode mode, QWidget* parent) #ifdef Q_OS_WIN32 // Don't show the window in the taskbar. Qt::ToolTip does this too, but it // adds an extra ugly shadow. - int ex_style = GetWindowLong(winId(), GWL_EXSTYLE); + int ex_style = GetWindowLong((HWND)winId(), GWL_EXSTYLE); ex_style |= WS_EX_NOACTIVATE; - SetWindowLong(winId(), GWL_EXSTYLE, ex_style); + SetWindowLong((HWND)winId(), GWL_EXSTYLE, ex_style); #endif // Mode settings