![]() |
splitter in a docking pane |
Post Reply
|
| Author | |
vjedlicka
Senior Member
Joined: 04 September 2007 Status: Offline Points: 122 |
Post Options
Thanks(0)
Quote Reply
Topic: splitter in a docking panePosted: 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.
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
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
vjedlicka
Senior Member
Joined: 04 September 2007 Status: Offline Points: 122 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
vjedlicka
Senior Member
Joined: 04 September 2007 Status: Offline Points: 122 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 October 2007 at 9:48am |
|
works OK now
Thanks! Vaclav |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |