No real changes, just change type of MSWGetBgBrush() argument.
Pass wxWindow instead of HWND to it as in most cases we already have wxWindow for the HWND we have and calling wxFindWinFromHandle() once more is unnecessary. This also makes the code of MSWGetBgBrushForChild() slightly simpler. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62932 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -367,7 +367,8 @@ WXHBRUSH wxControl::DoMSWControlColor(WXHDC pDC, wxColour colBg, WXHWND hWnd)
|
||||
WXHBRUSH hbr = 0;
|
||||
if ( !colBg.Ok() )
|
||||
{
|
||||
hbr = MSWGetBgBrush(pDC, hWnd);
|
||||
if ( wxWindow *win = wxFindWinFromHandle(hWnd) )
|
||||
hbr = MSWGetBgBrush(pDC, win);
|
||||
|
||||
// if the control doesn't have any bg colour, foreground colour will be
|
||||
// ignored as the return value would be 0 -- so forcefully give it a
|
||||
|
Reference in New Issue
Block a user