Solved

About CTabCtrl

Posted on 1997-12-08
1
751 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
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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MFC Dialog 9 51
Doc'in system (example?) BA 7 115
EvenOdd challenge 10 128
wordmultiple challenge 12 142
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…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

830 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