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

x
?
Solved

COXTabClientWnd custom CTabCtrl for MDI views

Posted on 2002-03-07
6
Medium Priority
?
623 Views
Last Modified: 2013-11-20
I'm using the control from http://www.codeproject.com/docview/tabbedmdi.asp

The problem is, when I start opening the child windows, the tabs build up to the point where they will no longer be able to fit in 1 row. At this point they split into two rows.

The problem is, the top row moves onto the top of the Main Frame window, and the second row stays on the bottom of the main frame window.

I want to keep all the tabs on the bottom of the main frame window.

On the above linked page is a sample program that does the exact same thing. All source is above too.

Summary: I'd like to prevent the tabs from being split up. How can I keep them all on 1 side of the main frame?
0
Comment
Question by:Crius
[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
  • 4
  • 2
6 Comments
 
LVL 49

Accepted Solution

by:
DanRollins earned 400 total points
ID: 6849989
Your questions are rarely so easy Cirus.  

In the demo project, change the line that says :

     VERIFY(m_MTIClientWnd.Attach(this));
to

     VERIFY(m_MTIClientWnd.Attach(this, TCS_MULTILINE|TCS_BOTTOM ));  // |TCS_HOTTRACK|TCS_SCROLLOPPOSITE|TCS_RIGHTJUSTIFY

-- Dan
0
 
LVL 3

Author Comment

by:Crius
ID: 6850941
Ah, I had seen that argument, but didn't try it out. Strange.

All my solutions were trying this:

    VERIFY(m_MTIClientWnd.Attach(this));
    m_MTIClientWnd.GetTabCtrl()->ModifyStyle(0, TCS_MULTILINE|TCS_BOTTOM);


Very strange that the ModifyStyle wasn't working.

Thank you for the excellent help!

Yeah, I've asked 15 questions here, and only 4 (this included) have ever gotten answered. :) But I had spent 3 hours examining manuals and trying to modify the style with no success. TCS_MULTILINE and TCS_BOTTOM were around the first I tried too. Hehe. :)
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 6851323
There is something strange in that softwaare... I modified the #define that supposedly sets the "default" styles and it had no effect (I knew right away, because I set it to put the tabs on the top...)

-- Dan
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 3

Author Comment

by:Crius
ID: 6851360
Indeed. I simply thought I had the incorrect values in the ModifyStyle, but I did note that when I removed the TCS_BOTTOM in the ModifyStyle I mentioned above, that it did put the tabs on top. That's why I was assuming the ModifyStyle was working, and that I needed to do something more complicated.
0
 
LVL 3

Author Comment

by:Crius
ID: 6851376
I figured it out.

Those styles were already in there which is why adding them in didn't help in the ModifyStyle command. When you passed them in as you did, it did ONLY those styles which nuked the TCS_SCROLLOPPOSITE style. That is the style that needed to be removed. After removing that one style, the control behaved as I wished.
0
 
LVL 3

Author Comment

by:Crius
ID: 6851420
Now the solution is complete:

Right from the MSDN library:
Remarks
The following styles can be modified after the control is created:

TCS_BOTTOM
TCS_BUTTONS
TCS_FIXEDWIDTH
TCS_FLATBUTTONS
TCS_FORCEICONLEFT
TCS_FORCELABELLEFT
TCS_MULTILINE
TCS_OWNERDRAWFIXED
TCS_RAGGEDRIGHT
TCS_RIGHT
TCS_VERTICAL


TCS_SCROLLOPPOSITE is not listed. No wonder I could not remove it with ModifyStyle. It seems I did not read carefully enough, but then, yesterday was hectic with many emergencies I had to solve myself. Thank you for your help again! It was needed, especially since your help enabled me to figure out why my method was not working.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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: 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: 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.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

609 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