Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Tab Control and Tab Item Help

Posted on 1998-12-21
2
Medium Priority
?
230 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 200 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…

916 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