Solved

Developer Studio type Tab controls/Property Sheets

Posted on 1997-06-12
9
297 Views
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?
0
Comment
Question by:tusawant
  • 4
  • 3
  • 2
9 Comments
 
LVL 4

Expert Comment

by:mbhakta
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.
0
 

Author Comment

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

0
 

Author Comment

by:tusawant
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.
Thanks
0
 
LVL 4

Expert Comment

by:mbhakta
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.


0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 4

Expert Comment

by:mbhakta
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.
0
 

Author Comment

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

Accepted Solution

by:
EHaimerl earned 100 total points
ID: 1302082
check out for http://www.algonet.se/~hulken/dmfc.htm - 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.
Edgar
0
 

Author Comment

by:tusawant
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.
Tushar
0
 

Expert Comment

by:EHaimerl
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: http://www.periphere.com/. 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.
Edgar
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now