Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Create Layout Dynamically
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Create Layout Dynamically

 Post Reply Post Reply
Author
Message
thodgson View Drop Down
Groupie
Groupie


Joined: 11 August 2003
Status: Offline
Points: 78
Post Options Post Options   Thanks (0) Thanks(0)   Quote thodgson Quote  Post ReplyReply Direct Link To This Post Topic: Create Layout Dynamically
    Posted: 08 December 2003 at 2:42pm

Using the Pane Sample from the Xtreme Toolkit Pro 8.6, there are two layouts "editor" and "run".  As far as I can tell, these two layouts are pre-packaged and not created on the fly.

What's the best way to create layouts on the fly, instead of loading them from the registry or file.  I want to do it progromatically, but am running into some issues: If I load a layout, then call the DockPane method, I get an error.

Anyone have a good example of accomplishing this?

 

Thanks,

Tim



Edited by thodgson
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 09 December 2003 at 1:39am

They are not predefined. 

Comment GetDockingPaneManager()->SetLayout(m_pEditorLayout); and you  will see it yourself.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
thodgson View Drop Down
Groupie
Groupie


Joined: 11 August 2003
Status: Offline
Points: 78
Post Options Post Options   Thanks (0) Thanks(0)   Quote thodgson Quote  Post ReplyReply Direct Link To This Post Posted: 09 December 2003 at 6:18am

After some digging and experimenting, I now see how the layouts are done.  One has to create the layouts by moving the panes to the desired location, then save the current position as a layout.  Then, when the program is loaded a second time, the layouts can be loaded from the registry/file/xml and not created from scratch again.

I originally was creating the layouts on the fly each time the program was loaded, and I was trying to save the last layout.  When I reran the program, I could load the last layout, but the program crashed whenever I tried to move the panes around dynamically - with DockPane or Hide, etc.

Just wish there was some documentation on this  - explaining that that is the way it should be done - though I am thankful for the sample, since that is all I had to go on.

Tim

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.188 seconds.