Print Page | Close Window

change color of tabs

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=3360
Printed Date: 11 January 2026 at 6:23pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: change color of tabs
Posted By: stephen
Subject: change color of tabs
Date Posted: 06 December 2005 at 2:30pm
Hi all,

How do I change the colors of my tabs as I create them? This is how I create them:

CMDIChildWnd* pNextChild = pMainFrame->CreateNewChild( RUNTIME_CLASS(CChildFrame), IDR_MAINFRAME, NULL, NULL);

This will create a new tab in the workspace. How do I then change the color of that tab ?

Thx.



Replies:
Posted By: Oleg
Date Posted: 06 December 2005 at 10:43pm

You can catch ON_MESSAGE(WM_XTP_GETTABCOLOR, OnGetTabColor)
on you CChildFrame and send color:

ON_MESSAGE(WM_XTP_GETTABCOLOR, OnGetTabColor)

LRESULT CMDIChildWndEx::OnGetTabColor(WPARAM, LPARAM)
{
 // Can return any one of the XTPTabOneNoteColor RGB color values or any
 // valid COLORREF value for example:
 //
 // return CXTPTabPaintManager::GetOneNoteColor(xtpTabColorOrange);

 return m_nColor;
}

 



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net