Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Serialize individual command bars
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Serialize individual command bars

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


Joined: 29 June 2006
Location: India
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote venkyhyd Quote  Post ReplyReply Direct Link To This Post Topic: Serialize individual command bars
    Posted: 02 March 2007 at 6:46am
Hello,
 
I have a Tabbed Toolbar in my application I would like to serialize the Tabbed Toolbar states (docking position and all) into .xml/.ini file. How can I serialize individual commandbars (like Tabbed Toolbars)? here the customization option for the tabbed toolbar is set to false.
 
But by using:
 

CXTPPropExchangeXMLNode px(FALSE, 0, _T("Settings"));

if (px.OnBeforeExchange())

{

CXTPPropExchangeSection pxCommandBars(px.GetSection(_T("CommandBars")));

XTP_COMMANDBARS_PROPEXCHANGE_PARAM param; param.bSerializeControls = TRUE; param.bSaveOriginalControls = FALSE;

GetCommandBars()->DoPropExchange(&pxCommandBars, &param);
-
-
}
would serliazie all the commandbars into same .xml file but here i want to serialize only one Tabbed Toolbar into different .xml file. Pls suggest
thnks
Back to Top
venkyhyd View Drop Down
Groupie
Groupie


Joined: 29 June 2006
Location: India
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote venkyhyd Quote  Post ReplyReply Direct Link To This Post Posted: 03 March 2007 at 2:15am
Hello Can Anyone suggest on this.....
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: 04 March 2007 at 3:59am
Hi,
 
Sorry, there is no way.
Why?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
venkyhyd View Drop Down
Groupie
Groupie


Joined: 29 June 2006
Location: India
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote venkyhyd Quote  Post ReplyReply Direct Link To This Post Posted: 05 March 2007 at 1:17am
Hello
 
I am able to do this by deriving a class from CXTPTabToolBar
 
and by calling the statements would serialize the tabbed toolbar dockstate.
CXTPPropExchangeXMLNode px(FALSE, 0, _T("IconPaletteSettings"));

if (px.OnBeforeExchange())

{// Save Current Dock Location:

CXTPPropExchangeSection pxIconPalette(px.GetSection(_T("IconPalette")));

this->GetCommandBars()->DoPropExchange(&pxIconPalette);

px.SaveToFile("C:\\TESTFILE.xml");

}
 
This would serialize the Tabbed Toolbar dock state but now I would like to serialize the contorls state (hidden / showed) present in the Tabbed Toolbar. Any Suggestion on serializing individual or group of controls present on the Toolbar of each Tab in tabbed Toolbar.
Back to Top
venkyhyd View Drop Down
Groupie
Groupie


Joined: 29 June 2006
Location: India
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote venkyhyd Quote  Post ReplyReply Direct Link To This Post Posted: 06 March 2007 at 12:33am
Hello
 
 
Any Suggestions.....
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: 06 March 2007 at 1:45am
You can't serialize only one toolbar's controls. I can't understand why you need this. Make another toolbars not customizable if you don't want to save/restore all states.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
venkyhyd View Drop Down
Groupie
Groupie


Joined: 29 June 2006
Location: India
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote venkyhyd Quote  Post ReplyReply Direct Link To This Post Posted: 06 March 2007 at 3:39am

hello Oleg,

Thanks for your reply.

Here we have a situation where we are creating a tabbed toolbar on click of file new. Now in this tabbed toolbar we place some buttons. And when we select Add & Remove options and select hide/show (check or uncheck) in the popup bar. Now we want to retain the state of the Tabbed Toolbar and its controls wrt previous state.

Hope you got our requirement.

thnks 

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