Solved

About CTabCtrl

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
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 demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now