We were using ProfUIS version 2.54 and have recently upgraded to the latest version 2.91.I built all the static and dll targets of 2.91 on VS2008.
We have created a class "ClassVerticalTabs" derived from CExtTabPageContainerOneNoteWnd & then have overridden OnCreate(LPCREATESTRUCT lpCreateStruct) which has been implemented as :-
int ClassVerticalTabs::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if( CExtTabPageContainerOneNoteWnd::OnCreate(lpCreateStruct) == -1 )
return -1;
OrientationSet( __ETWS_ORIENT_LEFT );
CCreateContext* pContext = NULL;
if (lpCreateStruct != NULL)
pContext = (CCreateContext*)lpCreateStruct->lpCreateParams;
CString strTabname = "Tab One";
if( ! m_view1->Create(NULL,_T(""),WS_CHILD | WS_VISIBLE,CRect(20,20,1,1), this,ID_VIEW1, pContext))
{
ASSERT( FALSE );
return -1;
}
if( ! PageInsert(m_view1->GetSafeHwnd(),strTabname))
{
ASSERT( FALSE );
return -1;
}
if( ! m_View2->Create(NULL,_T(""),WS_CHILD | WS_VISIBLE,CRect(30,30,1,1),this,ID_VIEW2, pContext))
{
ASSERT( FALSE );
return -1;
}
strTabname = "Tab Two";
if( ! PageInsert(m_View2->GetSafeHwnd(),strTabname))
{
ASSERT( FALSE );
return -1;
}
}
Here, m_view1 & m_view2 are instances of classes derived from CView class
Then we are creating instance of above derived class using following code:
ClassVerticalTabs tabview;
if( ! tabview.Create(this,CRect( 200,200,1,1 ),UINT(ID_PANE1),
WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
pContext ))
{
TRACE0("Failed to create view window\n");
return -1;
}
Thus, we have created one horizontal tab having multiple vertical tabs. To add new horizontal tabs, we have defined a class derived from CExtTabWhidbeyWnd. Now, suppose, we create two or more horizontal tabs each of which is having 10 or more vertical tabs. On switching between horizontal tabs, corresponding vertical tabs are to be displayed. This is done using
for ( int i=VerticalTabCount; i>0; --i )
tabview->PageRemove(i,TRUE,FALSE);
This will hide all the vertical tabs of previous horizontal tab
The problem is that switching between horizontal tabs causes flickering as all vertical tabs needs to be hidden. Please suggest.