Remove unnecessary RECT initialization in WM_NCCALCSIZE handler

No real changes, just make RECT (lack of) initialization before calling
GetThemeBackgroundContentRect() consistent between WM_NCCALCSIZE and
WM_NCPAINT handlers.

See https://github.com/wxWidgets/wxWidgets/pull/1141
This commit is contained in:
Vadim Zeitlin
2019-01-16 22:11:15 +01:00
parent ac9c9b3359
commit 8571cfed2f

View File

@@ -3729,7 +3729,12 @@ wxWindowMSW::MSWHandleMessage(WXLRESULT *result,
}
wxUxThemeHandle hTheme((const wxWindow *)this, L"EDIT");
RECT rcClient = { 0, 0, 0, 0 };
// There is no need to initialize rcClient: either it will
// be done by GetThemeBackgroundContentRect() or we'll do
// it below if it fails.
RECT rcClient;
wxClientDC dc((wxWindow *)this);
wxMSWDCImpl *impl = (wxMSWDCImpl*) dc.GetImpl();