Solved

Tab Control and Tab Item Help

Posted on 1998-12-21
2
221 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

635 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