Print Page | Close Window

splitter in a docking pane

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=8532
Printed Date: 06 November 2025 at 5:10am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: splitter in a docking pane
Posted By: vjedlicka
Subject: splitter in a docking pane
Date 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

 

 




Replies:
Posted By: Oleg
Date 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


Posted By: vjedlicka
Date 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


Posted By: Oleg
Date 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


Posted By: vjedlicka
Date Posted: 26 October 2007 at 9:48am
works OK now
Thanks!
Vaclav



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net