Developer Studio type Tab controls/Property Sheets

Posted on 1997-06-12
Last Modified: 2013-11-20
How do we create the Developer Studio type (One in which the tab handles are at the bottom) inverted tab control/Property Sheets?
Question by:tusawant
  • 4
  • 3
  • 2

Expert Comment

ID: 1302076
To make tab control which don't work like the CTabCtrl the easiest of the ways is to make a ownerdrawn listbox. Override  the WM_DRAWITEM and WM_MEASUREITEM messages. A tab as a whole is nothing but a cute looking listbox. Every item is an element. It is as easy as making an horizontal listbox.

Author Comment

ID: 1302077
That's a vague answer. Some concrete code would help. Thanks for the early reply.


Author Comment

ID: 1302078
I want the similar look and feel as the Developer Studio's Project Workspace. I want to put more than one tree controls similar to the Project Workspace (ones like classview, resourceview,fileview, infoview). I hope I am clear.
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!


Expert Comment

ID: 1302079
A vague answer for a vaguer question.. The experts exchange is a discussion group to find answers to your questions. Experts here do their best to answer your issues. If possible (if we find some code in hand) we publish it on the page or mail it to you. Seldom you find people going out of their way to take someones trouble on their shoulders. My job is to guide you to achieve your goals with the easiest possible solution. And I think I have provided you with a pretty good hint. I suggest you find a way to use this hint and do it yourself as you will hardly find any code doing this on the MSDN (I didn't) or elsewhere.


Expert Comment

ID: 1302080
If u have worked with ownerdrawn list boxes you won't have much trouble sorting this issue out. You have to make sure you have given enough height to each item in the listbox by overriding the WM_INSERTITEM. Now in your WM_drawitem mem function make sure you have drawn the tab control as it should look. This will require a bit of artistic touch to get the shading etc right. If you follow the necessary norms you should be up with this in a day or two.

Author Comment

ID: 1302081
Owner drawn list boxes is OK, but with it how do I use the tree controls?

Accepted Solution

EHaimerl earned 100 total points
ID: 1302082
check out for - Tab View is what you  want: define different views and handle them from one Wnd with tabs. Its free and come with the complete source. Its designed for SDI but can be used in MDI with one line deleted.

Author Comment

ID: 1302083
I downloaded the stuff and the exe is fine.Though it is not the same as what I wanted (Same Look and Feel of Developer's studio) the functionalty is the same and hopfully the code will help. Please give me more references for the Project Workspace/ Infoviewer/ Class Viewer type tabs.
Thank U.

Expert Comment

ID: 1302084
I am not sure if I got your new question right?
If you have a look at TabViews MainFram.cpp you find

BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
   m_splitterTabWnd.AddView( RUNTIME_CLASS( CTabView ),"View nr 1" );  
   m_splitterTabWnd.AddView( RUNTIME_CLASS( CviewTwo ),"View nr 2" );  
   m_splitterTabWnd.AddView( RUNTIME_CLASS( CTabView ),"View three is same as one" );  
   m_splitterTabWnd.Create( this, pContext );
   SetActiveView((CView *)m_splitterTabWnd.GetPane(0,0));
   return TRUE;

Here CTabView and CViewTwo are arbitrary example Views. Create any view you want (e.g. from CTreeView, CListView ...) and add it to splitterTabWnd.

More references?
Try weekly MFC extensions: It looks fine, but I have not tested it myselfe and it's not free. It's a lot of stuff. Have a closer look at the MFC\samples on your MSVC CD, there a examples of TreeView, ListView ...

Hope that helps - feel free to come up with detailed questions.

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

Suggested Solutions

Title # Comments Views Activity
Login Script to Copy Folders 12 47
bobThere java chalenge 45 95
Strange date stored 22 169
Best tools for Backup and restore of Wordpress site 6 58
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…
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.
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.

685 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