Solved

Tab Control and Tab Item Help

Posted on 1998-12-21
2
216 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
function returning CString in a regular win32 DLL 8 216
Installing Microsoft R server on REDHAT or SUSE Linux 4 162
Unix Command -- Challenging  question 7 107
wordcount challenge 11 164
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

752 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