![]() |
Problem in Customize dialog Menu reset? |
Post Reply
|
| Author | |
Ashok
Senior Member
Joined: 02 May 2007 Status: Offline Points: 164 |
Post Options
Thanks(0)
Quote Reply
Topic: Problem in Customize dialog Menu reset?Posted: 05 October 2007 at 1:32am |
|
Hi,
I doing the code for the menu like this
// Add the menu bar CXTPCommandBar* pMenuBar = pCommandBars->SetMenu(_T( "Menu Bar"), IDR_MAINFRAME); if(pMenuBar == NULL){ TRACE0( "Failed to create menu bar.\n"); return -1; // fail to create} Then I am loading my dynamic menu into the menu bar, some where in the code. But the problem is when I reset the menu through the customize dialog(reset button), it displays only the old menu( means its deleted my dynamic menu and it displays the IDR_MAINFRAME content). How I can restore my dynamic menu even if I press the reset button in the customize dialog. Please help with code. |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 October 2007 at 2:27am |
|
Hi,
After you create dynamic controls call
pMenuBar->GetControls()->CreateOriginalControls()
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Ashok
Senior Member
Joined: 02 May 2007 Status: Offline Points: 164 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 October 2007 at 6:42am |
|
Hi Oleg,
It works fine. Thanks a lot.
|
|
![]() |
|
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 |