Solved

Splitter window with PropertySheet

Posted on 2000-05-02
13
419 Views
Last Modified: 2013-11-20
Is it possible to have PropertySheet as one of the panes in splitterwindow ?
(note :I do not want to use tabcontrol on formview) if so how ?
0
Comment
Question by:MFC123
  • 8
  • 3
  • 2
13 Comments
 
LVL 4

Expert Comment

by:captainkirk
ID: 2773793
The main method is to have a CView derived class as a splitter pane - you could use a CFormView that contains a CPropertySheet...
0
 
LVL 1

Author Comment

by:MFC123
ID: 2773932
splitterwindow documentation says that any class derived from CWnd can be a pane in splitter window ! i want to know about it . btw, captainkirk, how can i put property sheet in cformview ?
I do not want to use tab control because i want to make property sheet wizard type .
0
 
LVL 1

Author Comment

by:MFC123
ID: 2774651
Adjusted points from 100 to 150
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 1

Author Comment

by:MFC123
ID: 2775454
Adjusted points from 150 to 200
0
 
LVL 1

Author Comment

by:MFC123
ID: 2778380
Adjusted points from 200 to 300
0
 
LVL 1

Author Comment

by:MFC123
ID: 2778383
Adjusted points from 300 to 400
0
 
LVL 12

Expert Comment

by:migel
ID: 2783757
Hi! I have sample project to you.
can you give me your EMail to send it.
my Email is migel.geo@yahoo.com
0
 
LVL 12

Accepted Solution

by:
migel earned 400 total points
ID: 2784050
in brief:
BOOL
// here
// m_pwndSheet1 and m_pwndSheet2
// pointers to the Property Sheet derived // classes (CMyPropertySheet)
// I make it for SDI app but you can do it // for MDI APP too
// CMainFrame in this case will be // CMDIChildWnd derived
CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/,
      CCreateContext* pContext)
{
      if (!m_wndSplitter.CreateStatic(this, 1, 2))
            return FALSE;
      m_pwndSheet1 = new CMyPropertySheet(&m_wndSplitter);
      m_pwndSheet1->Create(&m_wndSplitter, WS_CHILD|WS_VISIBLE);
      ::SetWindowLong(m_pwndSheet1->GetSafeHwnd(), GWL_ID, m_wndSplitter.IdFromRowCol(0,0));
      m_pwndSheet2 = new CMyPropertySheet(&m_wndSplitter);
      m_pwndSheet2->Create(&m_wndSplitter, WS_CHILD| WS_VISIBLE);
      ::SetWindowLong(m_pwndSheet2->GetSafeHwnd(), GWL_ID, m_wndSplitter.IdFromRowCol(0,1));
      return TRUE;
}

/////////////////////////////////////////////////////////////////////////////
// CMyPropertySheet message handlers
// changes needed for property sheet
BOOL CMyPropertySheet::OnInitDialog()
{
      
      BOOL bResult = CPropertySheet::OnInitDialog();

      ModifyStyleEx(0, WS_EX_CONTROLPARENT);
      CWnd* pWnd = GetDlgItem(IDCANCEL);
      if (pWnd)
            pWnd->DestroyWindow();

      return bResult;
}



BOOL CMyPropertySheet::PreTranslateMessage(MSG* pMsg)
{
      // TODO: Add your specialized code here and/or call the base class
      if (pMsg->message >= WM_KEYFIRST && pMsg->message <= WM_KEYLAST &&
            (pMsg->wParam ==VK_RETURN || pMsg->wParam == VK_ESCAPE))
            return TRUE;

      
      return CPropertySheet::PreTranslateMessage(pMsg);
}
0
 
LVL 4

Expert Comment

by:captainkirk
ID: 2788917
Somehow the code I posted here Friday didn't make it... I have a short demo project you can have and modify if you would give your email...
0
 
LVL 1

Author Comment

by:MFC123
ID: 2789245
Hi:
My email id upendrachitnis@yahoo.com

Thanks !!
0
 
LVL 1

Author Comment

by:MFC123
ID: 2790333
HI captainkirk and migel !
I am waiting for your sample projects ..
Thanks!
0
 
LVL 4

Expert Comment

by:captainkirk
ID: 2790336
I sent the project some time ago -- I will send it again now...
0
 
LVL 1

Author Comment

by:MFC123
ID: 2790729
migel's code is working. captain i never got the project which u sent. I guess i am going to allot points to migel now.

Thanks to both of u !

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

808 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