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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user