From 78072514e95dc3178c25878caa6ddedd92a6a307 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 16 Jan 2019 01:46:34 +0100 Subject: [PATCH] Simplify setting nState in WM_NCPAINT handler No real changes, this is just a trivial simplification removing some unnecessary and unused commented out code. --- src/msw/window.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 652910c9af..bdeb6400f2 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -3788,14 +3788,7 @@ wxWindowMSW::MSWHandleMessage(WXLRESULT *result, } // Draw the border - int nState; - if ( !IsEnabled() ) - nState = ETS_DISABLED; - // should we check this? - //else if ( ::GetWindowLong(GetHwnd(), GWL_STYLE) & ES_READONLY) - // nState = ETS_READONLY; - else - nState = ETS_NORMAL; + const int nState = IsEnabled() ? ETS_NORMAL : ETS_DISABLED; ::DrawThemeBackground(hTheme, GetHdcOf(*impl), EP_EDITTEXT, nState, &rcBorder, NULL); } }