[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Problem with switching tabs on multi rows to  tabs on single rows

Posted on 2007-10-08
Medium Priority
Last Modified: 2013-12-04
I created an ownerdrawn tab control (CTabCtrl).  I wanted to be able to set Tab Style on the fly.  For instance,
I have check box with two options - Tabs on single line, and Tabs on multiple row.
The problem is when user check on "Tabs on multiple rows", it shows Tabs on multiple rows, but it could not be changed back to show Tabs on single line again.  
I used following to switch to multiple lines:
ModifyStyle(ModifyStyle(TCS_MULTIROW, TCS_MULTIROW);

Any ideas?  appreciate any inputs!
Question by:yylibra61

Expert Comment

ID: 20038827
I can't speak to your particlar case, but you might have to invalidate the control or force an update/paint/refresh after the change. If nobody else comes along with a better idea, you might try looking for an MFC method on the control that will either do Invalidate, Paint, Refresh, Update, etc.

Good luck!
LVL 39

Accepted Solution

itsmeandnobodyelse earned 2000 total points
ID: 20038829
The switch to multiple lines should be

   m_tab.ModifyStyle(0, TCS_MULTIROW);

and back:

   m_tab.ModifyStyle(TCS_MULTIROW, 0);

The first argument is what flags are to remove and the second what flags are to add.

Regards, Alex


Author Comment

ID: 20042156
It worked!  thanks!

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

872 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