Solved

About CTabCtrl

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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…

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