SaveCommanbars to ini file? |
Post Reply |
Author | |
grade
Newbie Joined: 07 December 2006 Location: Taiwan Status: Offline Points: 25 |
Post Options
Thanks(0)
Posted: 24 January 2007 at 4:35am |
Hello, If i want to SaveCommandBars (LoadCommandBars) to(from) ini file,How to do?Thank you for you help!
|
|
Grade Wang
Software Engineer |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
See Samples\UserInterface\GUI_VisualStudio (GUI_Whidbey)
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
grade
Newbie Joined: 07 December 2006 Location: Taiwan Status: Offline Points: 25 |
Post Options
Thanks(0)
|
Hello Sir, I reference to GUI_VisualStudio Sample, I used to two CXTPPropExchangeIniFile Object in my project. The m_pxWriteIniFile is CXTPPropExchangeIniFile object, I call to SaveToFile function is no problem. but The m_pxReadIniFile(CXTPPropExchangeIniFile object) call to LoadFromFile function have two status for GetCommandBars(). I attached commandbar.zip for this post. |
|
Grade Wang
Software Engineer |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
You don't need save pointer. Use this code:
To Load:
CXTPPropExchangeIniFile px(TRUE, 0, _T("Settings"));
if (px.LoadFromFile(m_strIniFileName)) { GetCommandBars()->DoPropExchange(&px, NULL); } To Save:
CXTPPropExchangeIniFile px(FALSE, 0, _T("Settings"));
if (px.OnBeforeExchange())
{ GetCommandBars()->DoPropExchange(&px); px.SaveToFile(m_strIniFileName); } |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
grade
Newbie Joined: 07 December 2006 Location: Taiwan Status: Offline Points: 25 |
Post Options
Thanks(0)
|
Hello, The My Code is work. Thanks!
|
|
Grade Wang
Software Engineer |
|
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 |