Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Howto change the Color of the Tabbed Control Collapse All
Subject Author Date
ven rag Jun 21, 2006 - 12:16 AM

Hi ,

I am using CExtTabbedToolControlBarOneNote Tabbed Bar.
The tab colors are Blue, Yellow, Green etc. by default. Pls guide me to change the default color of the tabs.

For example, if i want to change the color of second tab from yellow to Orange, how to do it.
Please provide me with some sample code.

Thank u

Technical Support Jun 21, 2006 - 5:14 AM

It’s simple. Just assign both light and dark colors to the One Note tab item:

int nTabPageItemIndex = . . .
COLORREF clrNewColorLight = . . .
COLORREF clrNewColorDark = . . .
CExtTabbedToolControlBarOneNote * pWndTabbedToolBar = . . .
CExtTabPageContainerOneNoteWnd * pWndTPC = pWndTabbedToolBar->GetOneNoteTabPageContainer();
CExtTabOneNoteWnd * pWndTabs = STATIC_DOWNCAST( CExtTabOneNoteWnd, pWndTPC->GetSafeTabWindow() );
CExtTabOneNoteWnd::TAB_ITEM_INFO_ONENOTE * pTabItemInfo = pWndTabs->ItemGet( nTabPageItemIndex );
pTabItemInfo->SetColorBkLight( clrNewColorLight );
pTabItemInfo->SetColorBkDark( clrNewColorDark );

ven rag Jun 21, 2006 - 11:53 PM


Thank u
venrag