Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

About CTabCtrl

Posted on 1997-12-08
1
Medium Priority
?
774 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 100 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

Industry Leaders: 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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

597 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