Solved

Tab Control and Tab Item Help

Posted on 1998-12-21
2
180 Views
Last Modified: 2013-11-20
i'm using this in my oncreate handler

if (!m_TabCtrl.Create( WS_CHILD | WS_VISIBLE, CRect( 0, 0, 0, 0), this , IDC_TAB_CTRL))
{
   TRACE0("Failed to create view for CResultsPanel\n");
   return -1;
}
m_TabCtrl.ModifyStyleEx(0, ~WS_EX_WINDOWEDGE );

if (!TabFont.CreatePointFont( 80, "Arial", NULL ))
{
   TRACE0("Failed to create view for CResultsPanel\n");
   return -1;
}

m_TabCtrl.SetFont( &TabFont, TRUE );

TabItem.mask = TCIF_TEXT;
TabItem.pszText = _T("Erros");
m_TabCtrl.InsertItem( 0, &TabItem );
TabItem.pszText = _T("Resultados");
m_TabCtrl.InsertItem( 1, &TabItem );


the problem is that i cant change the font of the tabs, and everything goes ok, the control is displayed but with the default font
0
Comment
Question by:PedroG
2 Comments
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 50 total points
ID: 1326526
Where is TabFont declared? It doesn't appear to be a member data. If this is the case, then when the function leaves, the font is automatically destroyed. Make it a member of the class and it should work.
0
 
LVL 2

Author Comment

by:PedroG
ID: 1326527
is there any whay to show the tabs in the bottom insted of the top side tha is usual
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now