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:
Vadim Zeitlin
2009-12-18 20:49:23 +00:00
parent b93051ef46
commit b8797d96ca
6 changed files with 21 additions and 22 deletions

View File

@@ -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