Solved

About CTabCtrl

Posted on 1997-12-08
1
757 Views
Last Modified: 2013-11-20
* How can I change the text in a CTabCtrl ?
Must I use 'SetItem' for this operation ?

I have try first to get the text of a tab by using :

 
  CTabCtrl *pTab = pSheet->GetTabControl();
  TC_ITEM   TcItem;
  char      Text[255];
  BOOL      rcCode;

  TcItem.mask = TCIF_TEXT;
  TcItem.pszText = Text;

  rcCode = pTab->GetItem(0,&TcItem);

After this rcCode is egal to FALSE. Why ?

* The second question is,
How can I disable some tabs in a CTabCtrl ?
I want that the disabled tabs are grayed !
0
Comment
Question by:mike_marquet
[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
1 Comment
 
LVL 7

Accepted Solution

by:
galkin earned 50 total points
ID: 1311803
First to get tab text you must also specify text length in cchTextMax field. To disable selected tab I guess you must implement owner draw tab control, draw text on disabled tab using grayed text, and block WM_LBUTTONDOWN message as well as arrow key for that tab.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
zeroMAx challenge 20 134
firstChar challenge 13 143
x-bar in Google Sheets 2 123
moto 4g phone enable finger print 4 68
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: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

739 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