[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

COXTabClientWnd custom CTabCtrl for MDI views

Posted on 2002-03-07
6
Medium Priority
?
627 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
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Technology Partners: 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

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.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month17 days, 18 hours left to enroll

829 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