diff --git a/src/renderer/win32/indicator_window.cc b/src/renderer/win32/indicator_window.cc index aa7d659d66..63e4cf9935 100644 --- a/src/renderer/win32/indicator_window.cc +++ b/src/renderer/win32/indicator_window.cc @@ -35,7 +35,6 @@ #include #include #include -#include #include // clang-format on @@ -112,10 +111,10 @@ class IndicatorWindow::WindowImpl WindowImpl(const WindowImpl &) = delete; WindowImpl &operator=(const WindowImpl &) = delete; - BEGIN_MSG_MAP_EX(WindowImpl) - MSG_WM_CREATE(OnCreate) - MSG_WM_TIMER(OnTimer) - MSG_WM_SETTINGCHANGE(OnSettingChange) + BEGIN_MSG_MAP(WindowImpl) + MESSAGE_HANDLER(WM_CREATE, OnCreate) + MESSAGE_HANDLER(WM_TIMER, OnTimer) + MESSAGE_HANDLER(WM_SETTINGCHANGE, OnSettingChange) END_MSG_MAP() void OnUpdate(const commands::RendererCommand &command, @@ -306,6 +305,23 @@ class IndicatorWindow::WindowImpl } } + inline LRESULT OnCreate(UINT msg_id, WPARAM wparam, LPARAM lparam, + BOOL &handled) { + return static_cast( + OnCreate(reinterpret_cast(lparam))); + } + inline LRESULT OnTimer(UINT msg_id, WPARAM wparam, LPARAM lparam, + BOOL &handled) { + OnTimer(static_cast(wparam)); + return 0; + } + inline LRESULT OnSettingChange(UINT msg_id, WPARAM wparam, LPARAM lparam, + BOOL &handled) { + OnSettingChange(static_cast(wparam), + reinterpret_cast(lparam)); + return 0; + } + CBitmapHandle current_image_; CPoint top_left_; BYTE alpha_; diff --git a/src/renderer/win32/infolist_window.h b/src/renderer/win32/infolist_window.h index f25ca3f76c..51f67527bb 100644 --- a/src/renderer/win32/infolist_window.h +++ b/src/renderer/win32/infolist_window.h @@ -36,7 +36,6 @@ #include #include #include -#include #include #include // clang-format on @@ -67,22 +66,22 @@ class InfolistWindow : public ATL::CWindowImpl(LOWORD(wparam)), + static_cast(HIWORD(wparam)), + reinterpret_cast(lparam)); + return 0; + } + inline LRESULT OnEraseBkgnd(UINT msg_id, WPARAM wparam, LPARAM lparam, + BOOL &handled) { + return static_cast(OnEraseBkgnd(reinterpret_cast(wparam))); + } + inline LRESULT OnGetMinMaxInfo(UINT msg_id, WPARAM wparam, LPARAM lparam, + BOOL &handled) { + OnGetMinMaxInfo(reinterpret_cast(lparam)); + return 0; + } + inline LRESULT OnSettingChange(UINT msg_id, WPARAM wparam, LPARAM lparam, + BOOL &handled) { + OnSettingChange(static_cast(wparam), + reinterpret_cast(lparam)); + return 0; + } + inline LRESULT OnPaint(UINT msg_id, WPARAM wparam, LPARAM lparam, + BOOL &handled) { + OnPaint(reinterpret_cast(wparam)); + return 0; + } + inline LRESULT OnPrintClient(UINT msg_id, WPARAM wparam, LPARAM lparam, + BOOL &handled) { + OnPrintClient(reinterpret_cast(wparam), static_cast(lparam)); + return 0; + } + inline LRESULT OnTimer(UINT msg_id, WPARAM wparam, LPARAM lparam, + BOOL &handled) { + OnTimer(static_cast(wparam)); + return 0; + } + Size DoPaint(WTL::CDCHandle dc); Size DoPaintRow(WTL::CDCHandle dc, int row, int ypos);