From 96da0060ca159f49c8781d0ec02a6ff262b7a797 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 31 Oct 2019 23:56:55 +0100 Subject: [PATCH] Remove MSWGetFocusHwnd() helper It doesn't seem worth having it when it's only used in a couple of places in a single file, unlike GetHwnd() which is used in dozens of places across entire wxMSW. --- include/wx/msw/private.h | 1 - src/msw/window.cpp | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index 46dffa05a6..f850b7b554 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -838,7 +838,6 @@ private: // --------------------------------------------------------------------------- #define GetHwnd() ((HWND)GetHWND()) -#define MSWGetFocusHwnd() ((HWND)MSWGetFocusHWND()) #define GetHwndOf(win) ((HWND)((win)->GetHWND())) // old name #define GetWinHwnd GetHwndOf diff --git a/src/msw/window.cpp b/src/msw/window.cpp index fd048e6e01..8f683c5773 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -577,7 +577,7 @@ void wxWindowMSW::SetId(wxWindowID winid) void wxWindowMSW::SetFocus() { - HWND hWnd = MSWGetFocusHwnd(); + HWND hWnd = (HWND)MSWGetFocusHWND(); wxCHECK_RET( hWnd, wxT("can't set focus to invalid window") ); ::SetLastError(0); @@ -599,7 +599,7 @@ void wxWindowMSW::SetFocus() void wxWindowMSW::SetFocusFromKbd() { - HWND hWnd = MSWGetFocusHwnd(); + HWND hWnd = (HWND)MSWGetFocusHWND(); // when the focus is given to the control with DLGC_HASSETSEL style from // keyboard its contents should be entirely selected: this is what