WXHBRUSH wxNotebook::QueryBgBitmap() { wxRect r = GetPageSize(); if ( r.IsEmpty() ) return 0; wxUxThemeHandle theme(this, L"TAB"); if ( !theme ) return 0; RECT rc; wxCopyRectToRECT(r, rc); WindowHDC hDC(GetHwnd()); wxUxThemeEngine::Get()->GetThemeBackgroundExtent ( theme, (HDC) hDC, 9 /* TABP_PANE */, 0, &rc, &rc ); MemoryHDC hDCMem(hDC); CompatibleBitmap hBmp(hDC, rc.right, rc.bottom); SelectInHDC selectBmp(hDCMem, hBmp); if ( !DoDrawBackground((WXHDC)(HDC)hDCMem) ) return 0; return (WXHBRUSH)::CreatePatternBrush(hBmp); }
WXHBRUSH wxNotebook::QueryBgBitmap() { wxRect r = GetPageSize(); if ( r.IsEmpty() ) return 0; WindowHDC hDC(GetHwnd()); MemoryHDC hDCMem(hDC); CompatibleBitmap hBmp(hDC, r.x + r.width, r.y + r.height); SelectInHDC selectBmp(hDCMem, hBmp); if ( !DoDrawBackground((WXHDC)(HDC)hDCMem) ) return 0; return (WXHBRUSH)::CreatePatternBrush(hBmp); }