Solved

Developer Studio type Tab controls/Property Sheets

Posted on 1997-06-12
9
320 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
[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
  • 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
Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

 
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
 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

628 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