26#include <wx/nonownedwnd.h>
28#include <wx/msw/registry.h>
38 const wxString lightModeKey = wxT(
"AppsUseLightTheme" );
42 wxRegKey themeKey( wxRegKey::HKCU,
43 wxT(
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize" ) );
45 if( !themeKey.Exists() )
48 if( !themeKey.HasValue( lightModeKey ) )
53 if( !themeKey.QueryValue( lightModeKey, &val ) )
58 wxColour bg = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW );
61 double brightness = ( bg.Red() / 255.0 ) * 0.299 +
62 ( bg.Green() / 255.0 ) * 0.587 +
63 ( bg.Blue() / 255.0 ) * 0.117;
65 return brightness < 0.5;
72 return wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE );
78 aBGColour = wxSystemSettings::GetColour( wxSYS_COLOUR_INFOBK );
79 aFGColour = wxSystemSettings::GetColour( wxSYS_COLOUR_INFOTEXT );
96 return ( aWindow->GetHWND() == GetForegroundWindow() );
116 case wxCURSOR_BULLSEYE:
140 return aWindow->GetContentScaleFactor();
146 return aWindow->GetDPIScaleFactor();
152 return aWindow->GetClientSize();
170 return wxGetMousePosition();
176 aWindow->WarpPointer( aX, aY );
185 ImmAssociateContext( aWindow->GetHWND(), NULL );
189 ImmAssociateContextEx( aWindow->GetHWND(), 0, IACE_DEFAULT );
196 const HIMC himc = ImmGetContext( aWindow->GetHWND() );
197 ImmNotifyIME( himc, NI_COMPOSITIONSTR, CPS_CANCEL, 0 );
198 ImmReleaseContext( aWindow->GetHWND(), himc );
std::shared_ptr< PNS_LOG_VIEWER_OVERLAY > overlay