Simplify setting nState in WM_NCPAINT handler

No real changes, this is just a trivial simplification removing some
unnecessary and unused commented out code.
This commit is contained in:
Vadim Zeitlin
2019-01-16 01:46:34 +01:00
parent f09b3de914
commit 78072514e9

View File

@@ -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);
}
}