Splitter window with PropertySheet

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 ?
LVL 1
MFC123Asked:
Who is Participating?
 
migelCommented:
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
 
captainkirkCommented:
The main method is to have a CView derived class as a splitter pane - you could use a CFormView that contains a CPropertySheet...
0
 
MFC123Author Commented:
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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

 
MFC123Author Commented:
Adjusted points from 100 to 150
0
 
MFC123Author Commented:
Adjusted points from 150 to 200
0
 
MFC123Author Commented:
Adjusted points from 200 to 300
0
 
MFC123Author Commented:
Adjusted points from 300 to 400
0
 
migelCommented:
Hi! I have sample project to you.
can you give me your EMail to send it.
my Email is migel.geo@yahoo.com
0
 
captainkirkCommented:
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
 
MFC123Author Commented:
Hi:
My email id upendrachitnis@yahoo.com

Thanks !!
0
 
MFC123Author Commented:
HI captainkirk and migel !
I am waiting for your sample projects ..
Thanks!
0
 
captainkirkCommented:
I sent the project some time ago -- I will send it again now...
0
 
MFC123Author Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.