Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - splitter in a docking pane
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

splitter in a docking pane

 Post Reply Post Reply
Author
Message
vjedlicka View Drop Down
Senior Member
Senior Member


Joined: 04 September 2007
Status: Offline
Points: 122
Post Options Post Options   Thanks (0) Thanks(0)   Quote vjedlicka Quote  Post ReplyReply Direct Link To This Post Topic: splitter in a docking pane
    Posted: 25 October 2007 at 2:43pm
Hello,
 
I am trying to create a docking pane with two controls separated by a splitter window (2 rows 1 column). Something like class view in Visual studio.


I created a CWnd inherited class that should serve as a container for the splitter and the 2 controls.

In CMainFrame in OnDockingPaneNotify method I create the container.

In the container window in OnCreate method I try to create the splitter and the two controls. Nothing appears in the pane when I run the app.

What am doing wrong? I am not sure if the splitter can live in a normal window (not CFrameWnd).

Is there any example I can look at? Advice?

Thanks in advance
Vaclav

 

 

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 26 October 2007 at 1:36am
Hi,
 
Why you can't create CFrameWnd derived class instead of CWnd for this pane ?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
vjedlicka View Drop Down
Senior Member
Senior Member


Joined: 04 September 2007
Status: Offline
Points: 122
Post Options Post Options   Thanks (0) Thanks(0)   Quote vjedlicka Quote  Post ReplyReply Direct Link To This Post Posted: 26 October 2007 at 3:18am
Hi Oleg,


I tried to use CWnd, because I was confused by the fact that the CFrameWnd based class had protected constructor and destructor.

Then I tried to change constructor and destructor to be public. Now it seems to work. The pane + controls appear correctly.

The only thing I am not sure is how to create CFrameWnd? I call

m_wndFrame = new CFrameWnd() in constructor of CMainFrame

but I get an error when I call

delete m_wndFrame in destructor of CMainFrame


Thank you
Vaclav
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 26 October 2007 at 5:37am
Hi,
 
Call it as
m_pFrame = (CFrameWnd*)CFrameWnd::CreateObject();
 
and don't call delete - CFrameWnd will be destroyed automatically.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
vjedlicka View Drop Down
Senior Member
Senior Member


Joined: 04 September 2007
Status: Offline
Points: 122
Post Options Post Options   Thanks (0) Thanks(0)   Quote vjedlicka Quote  Post ReplyReply Direct Link To This Post Posted: 26 October 2007 at 9:48am
works OK now
Thanks!
Vaclav
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.