Toolbar reset makes SetCaption() undone? |
Post Reply |
Author | |
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
Posted: 17 January 2008 at 10:05am |
I have a toolbar which is loaded from a resource IDR_TOOL. Then I replace certain strings using FindControl(...)->SetCaption(...). Now, if the user clicks "Reset toolbar" in the application my custom caption strings seem to be reset. Is this the right behavior? I guess I have to catch a "reset" event and call SetCaption again... am I right?
Thanks!
|
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
ON_MESSAGE(WM_XTP_CUSTOMIZATION_RESETTOOLBAR, OnResetToolBar)
Then update the toolbar captions in OnResetToolBar. In case somebody encounters the same problem...
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, Better in OnCreate after you modifyed all buttons and before you call LoadCommandBars add
pToolBar->GetControls()->CreateOriginalControls(); - it will create "original" version to reset.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
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 |