Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - change color of tabs
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

change color of tabs

 Post Reply Post Reply
Author
Message
stephen View Drop Down
Newbie
Newbie
Avatar

Joined: 06 December 2005
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote stephen Quote  Post ReplyReply Direct Link To This Post Topic: change color of tabs
    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.
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.031 seconds.