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

@@ -1248,14 +1248,14 @@ void wxNotebook::UpdateBgBrush()
}
}
WXHBRUSH wxNotebook::MSWGetBgBrushForChild(WXHDC hDC, WXHWND hWnd)
WXHBRUSH wxNotebook::MSWGetBgBrushForChild(WXHDC hDC, wxWindow *child)
{
if ( m_hbrBackground )
{
// before drawing with the background brush, we need to position it
// correctly
RECT rc;
::GetWindowRect((HWND)hWnd, &rc);
::GetWindowRect(GetHwndOf(child), &rc);
::MapWindowPoints(NULL, GetHwnd(), (POINT *)&rc, 1);
@@ -1267,7 +1267,7 @@ WXHBRUSH wxNotebook::MSWGetBgBrushForChild(WXHDC hDC, WXHWND hWnd)
return m_hbrBackground;
}
return wxNotebookBase::MSWGetBgBrushForChild(hDC, hWnd);
return wxNotebookBase::MSWGetBgBrushForChild(hDC, child);
}
bool wxNotebook::MSWPrintChild(WXHDC hDC, wxWindow *child)