Solved

Want to make C++ workspace window

Posted on 2002-03-21
4
333 Views
Last Modified: 2013-11-20
I am a engine type person in software development, I've done virtually nothing with creating interface stuff, other then buttons, dialogs, and such.  

What I like to do is to create the c++ workspace window with all the exact charateristics. i.e. (tabs,treeview, and such) again EXACTLY like the workspace window in C++.  The only thing that I will change is:

1.) instead of Classview I will put input, and for File view I will put output and change the respective icons on the tabs (I only need two tabs currently, may add one later), it will behave just like in Viusual C++ when you turn it on or off.



I have a window that was created and I fixed.  It has a splitter in it.  So now, what I need is to create this new workspace window and then have the system adjust both windows (I think its that RecalLayout funtion)

if you open viusal c then just have the workspace button pressed with a c++ file up in the editor, that is what I want except in my case, the c++ file will have a splitter through it)


OK currently I have a class called CChildFrame (below)


// class forwards.
class CInputView;
class COutputView;

class CChildFrame : public CMDIChildWnd
{
     DECLARE_DYNCREATE(CChildFrame)
public:
     CChildFrame();

// Attributes
public:
     CCNCDoc                    *m_pDoc;
     CTreeView                m_wndWorkspace;//this was a guess
     CInputView                    *m_pInputView;
     COutputView                    *m_pOutputView;
     CImageList                    m_TabImages;
//     CTr                         *pWnd;

     // Splitter stuff
     CSplitterWnd          m_wndSplitter;
     CFrameWnd                    *m_pDrawingFrame;
     CFrameWnd                    *m_pDetailsFrame;
     BOOL                         m_bDetails;
};

I assume I will create the new window in the function below:

int CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
 (* assume you create the workspace window here*?????????)
}

Here is where the splitter window gets created (and works fine):

BOOL CChildFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
     // Create the splitter window with two rows
     if (!m_wndSplitter.CreateStatic(this, 2, 1))
     {
          TRACE0("Failed to create splitter window\n");
          return FALSE;
     }

     // Top splitter window
     if (!m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CCNCNestView),
          CSize(0, 250), pContext))
     {
          m_wndSplitter.DestroyWindow();
          return -1;
     }

     // Bottom splitter window
     if (!m_wndSplitter.CreateView(1,0,RUNTIME_CLASS(CJobSettingsView),
          CSize(0, 0), pContext))
     {
          m_wndSplitter.DestroyWindow();
          return -1;
     }
// Set pointers to the two splitter pane frame windows
     m_pDrawingFrame = (CFrameWnd*)  m_wndSplitter.GetPane(0,0);
     ASSERT(m_pDrawingFrame);
     m_pDetailsFrame = (CFrameWnd*)m_wndSplitter.GetPane(1,0);
     ASSERT(m_pDetailsFrame);


}

I have two classses ready that are called:
CInputView and COutputView


This is about where I'm at.....

wheels spinning and nowhere to go.  ready to learn!
0
Comment
Question by:ericcnc
  • 2
4 Comments
 
LVL 49

Expert Comment

by:DanRollins
ID: 6888158
I think that VC++'s workspace window is a floating toolbar. I doubt if it uses formal views (CView-derived objects).  If I were to try to emulate it, I'd set up a CPropertySheet-derived window inside of a toolbar.  There would be some interesting challenges, including the need to resize the controls.

If all you want is a splitter with a pair of tabs on the left side, then there are several Property sheet techniques discussed here:

  http://www.codeguru.com/propertysheet/index.shtml

that might do the trick.  You can make the tabs appear on the bottom by setting the TCS_BOTTOM style in the associated Tab Control. See CPropertySheet::GetTabControl()

-- Dan

0
 

Author Comment

by:ericcnc
ID: 6890073
not quite what I want

They look good but i want to have it dock to either left or right side.  I was thinking about it and I need a toolbar type window with property sheets and tree control in the property sheets. kind of a all in one thing....

I was researching and so far I came up with this:

I need to derive something from this class CControlBar
CMyClass : public CControlBar (that gets me my docking) then I need to figure out how to create a view or toolbar or whatever the hell that thing is and ensure that the above works, which I have no experience in except for stab in the dark methodology........

The points issue is not a problem, just my lack of understanding what to do, seeing that I'm not that familar with creating stuff and then figuring which classes give me what I want.  
0
 

Accepted Solution

by:
AndyReed earned 100 total points
ID: 6896589
Take a look at the following article. It has some very good source code to download and use.
http://www.thecodeproject.com/docking/sizecbar.asp

Andy.
0
 

Author Comment

by:ericcnc
ID: 6897807
Good reference
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Adapt this command to show who installed 29 108
deburging in oracle form 12 99
haveThree challenge 22 118
Message not shown 5 49
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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…
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.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

785 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