![]() |
Saving Toolbars and Dockable Panes to XML file |
Post Reply
|
| Author | |
eclipse
Newbie
Joined: 02 November 2006 Location: Germany Status: Offline Points: 5 |
Post Options
Thanks(0)
Quote Reply
Topic: Saving Toolbars and Dockable Panes to XML filePosted: 02 November 2006 at 9:46am |
|
Hi,
I'm currently doing a project for a company. We decided it would be best to use the Xtreme toolkit pro for a project. The application manages different project files. Toolbar positions as well as dockable pane visibilities. I need to be able to store the docking state in a separate file preferably an xml file. Is this easily possible if so could anyone give me a hint where to look? So far I found ways to save the state to the registry or an ini file. I have found the Pane example that allows saving the pane state to a xml file. Iwould need both saving pane positions and toolbar positions to a xml file or if this is not possible to a ini file of my choice. Thanks, Ingo |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 02 November 2006 at 11:37am |
|
Hello,
Check Samples\UserInterface\GUI_Whidbey - Toolbars/Panes and Toolbox are stored to xml file.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
eclipse
Newbie
Joined: 02 November 2006 Location: Germany Status: Offline Points: 5 |
Post Options
Thanks(0)
Quote Reply
Posted: 03 November 2006 at 3:13am |
|
Thank you, that is what i was looking for.
|
|
![]() |
|
eclipse
Newbie
Joined: 02 November 2006 Location: Germany Status: Offline Points: 5 |
Post Options
Thanks(0)
Quote Reply
Posted: 03 November 2006 at 9:50am |
|
Can you tell me if there is a way to save the Window placement using the same streaming machanism as for the control bars? So far I could only find Mehtods storing the data to the registry (LoadPlacement, SavePlacement). The WindowPos example uses SaveWindowPos(this), but the documentation does not tell where it stores the position.
I would like to store it in an xml file but dont know how. Any hints are appreciated. Regards, Ingo |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 03 November 2006 at 10:51am |
|
Hi, See in help PX_Blob method and CXTPPropExchange class
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
eclipse
Newbie
Joined: 02 November 2006 Location: Germany Status: Offline Points: 5 |
Post Options
Thanks(0)
Quote Reply
Posted: 06 November 2006 at 7:10am |
|
Ok, thank you. Serializing the window placement seems to work but there is another question. To make it short: How can I access the GuiState node for reading in the following xml file:
<Application> <OtherData> </OtherData> <GuiState> ... </GuiState> </Application> Where OtherData is completeley unrelated to the XTremeToolkit Pro. So far i have tried using: CXTPPropExchangeXMLNode px(TRUE, NULL, VM_XML_NODE); pxRootNode.LoadFromFile( sFile.c_str() ) ); CXTPPropExchangeXMLNode pxGuiNode(TRUE, pxRootNode.GetSectionNode(), _T("GuiState")); hoping to get access to the GUI node. This fails because it seems to create a new empty node. The documentation is not very helpfull in this case. Examples like the following won't help me because they seem to imply the xml stores the data in its root node. CXTPPropExchangeXMLNode px(TRUE, 0, _T("Settings")); if (px.LoadFromFile(m_strIniFileName)) { m_wndTaskPanel.GetGroups()->DoPropExchange(&px); } Regards, Ingo |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 06 November 2006 at 7:18am |
|
Here sample:
CXTPPropExchangeXMLNode px(TRUE, NULL, _T("Application"));
pxRootNode.LoadFromFile( sFile.c_str() ) ); CXTPPropExchangeSection secGuiState(pxRootNode.GetSection(_T("GuiState")));
// read/write to GuiState
PX_DWord(&secGuiState, _T("Version"), m_dwVersion, 0);
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
eclipse
Newbie
Joined: 02 November 2006 Location: Germany Status: Offline Points: 5 |
Post Options
Thanks(0)
Quote Reply
Posted: 07 November 2006 at 5:36pm |
|
OK, thank you. It's working now.
|
|
![]() |
|
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 |