Making an MFC CTabCtrl not use the full control width for drawing tabs

891 views Asked by At

We have a somewhat involved request for a change in our application, which is to make one of our tab controls only have access to part of the width of the control for the purposes of drawing the tabs, so that we can stick some additional status text in the remaining area on the side.

A picture would probably help:

Complex UI Request

As you can see, the tab control extends all the way to the right of the dialog, but we want a reserved area for "Total Inventory Cost", and we want to make sure that additional tabs (which are common) don't encroach onto that area.

I'm open to pretty much any means of implementing this, short of completely rewriting the application. We can switch tab controls if there's one out there that works better, or otherwise change the implementation of the tab setup within reason.

I would have thought that one could separately set the client area and the tab drawing rectangle areas separately, but that doesn't seem to be the case. Please correct me if I'm wrong.

Any help appreciated!

1

There are 1 answers

2
AudioBubble On BEST ANSWER

If I understand correctly, what you've got is this

Main window's client area:

  • -> tab ctrl occupying the enttire area
  • -> some other controls on top of tab control

What you could do is this

Main window's client area:

  • -> Small tab control at the bottom
  • -> All othe controls in main window's client area