I create a new MFC project using VS2010, in order to use the new features (RIBBON, DOCK, TABVIEW)...
The CTabView have several views
innt
CMyTabView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CTabView::OnCreate(lpCreateStruct) == -1)
return -1;
pTab->ModifyTabStyle(CMFCTabCtrl::STYLE_3D_ONENOTE);
}
Each view has the OnPaint()
void
CMyView1::OnPaint()
{
CPaintDC dc(this); // device context for painting
OnPrepareDC (&dc);
OnDraw(&dc);
}
I will like to have the gradient background matching with the color tab, however I am having a plain ligh gray. If I activate the Render the Hurricane, I got it the hurricane in a gray scale. no colors et all.
Your help is appreciate,
Regards,
Alfonso
if((! g_PaintManager->GetCb2DbTransparentMode( (CObject*)this ))
||
(! g_PaintManager->PaintDockerBkgnd( true, dc, (CWnd*)this ) ) )
{
CRect rcClient;
GetClientRect( &rcClient );
if( dc.RectVisible( &rcClient ) )
dc.FillSolidRect(&rcClient,g_PaintManager->GetColor(CExtPaintManager::CLR_3DFACE_OUT));
}
CMFCTabCtrl* pTab = &GetTabControl();
AddView (RUNTIME_CLASS (CMyView1), _T(
"View 1"));
AddView (RUNTIME_CLASS (CMyView2), _T("View 2"));
....
}
///////////////////////////////////////////////
CMainFrame:CMainFrame()....
{...
g_PaintManager->m_bCustomBackgroundInheritanceEnabled = true;
...