![]() |
SaveCommanbars to ini file? |
Post Reply
|
| Author | |
grade
Newbie
Joined: 07 December 2006 Location: Taiwan Status: Offline Points: 25 |
Post Options
Thanks(0)
Quote Reply
Topic: SaveCommanbars to ini file?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
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 24 January 2007 at 5:36am |
|
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)
Quote Reply
Posted: 25 January 2007 at 3:00pm |
|
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
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 January 2007 at 1:41am |
|
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)
Quote Reply
Posted: 26 January 2007 at 3:09am |
|
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 |