Solved

COXTabClientWnd custom CTabCtrl for MDI views

Posted on 2002-03-07
6
621 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 100 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
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!

 
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

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: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

717 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