You can use a skinable paint manager from the ProfSkin library (which comes with Prof-UIS) or any paint manager from Prof-UIS. In any case, the background of your window should be painted using the following code:
CPaintDC dc( this );
if( (! PmBridge_GetPM()->GetCb2DbTransparentMode(this) )
|| (! PmBridge_GetPM()->PaintDockerBkgnd( true, dc, this ) )
)
{
CRect rcClient;
GetClientRect( &rcClient );
COLORREF clrBackground = g_PaintManager->GetColor( CExtPaintManager::CLR_3DFACE_OUT );
dc.FillSolidRect( &rcClient, clrBackground );
}
// TO-DO: paint content of your window here ...
PmBridge_GetPM()->OnPaintSessionComplete( this );
Of course, you may need a flicker free version. So, the first line of code
CPaintDC dc( this );
should be replaced with:
CPaintDC dcPaint( this );
CRect rcClient;
GetClientRect( &rcClient );
CExtMemoryDC dc ( &dcPaint, &rcClient );
The code above paints a themed Prof-UIS background of any window. If you need to implement some custom background which is shared between deeply nested parent windows, then you can also use the code above except you should implement a
CExtPaintManager::g_nMsgPaintInheritedBackground
registered message handler as it is demonstrated in the
TabbedBars sample application which is able to draw the hurricane like background in the main frame window and application specific gradient background in the One Note tab page container window with colored tabs created as the main SDI view window.