Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Problem in Customize dialog Menu reset?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem in Customize dialog Menu reset?

 Post Reply Post Reply
Author
Message
Ashok View Drop Down
Senior Member
Senior Member


Joined: 02 May 2007
Status: Offline
Points: 164
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ashok Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 05 October 2007 at 2:27am
Hi,
 
After you create dynamic controls call
 
pMenuBar->GetControls()->CreateOriginalControls()
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Ashok View Drop Down
Senior Member
Senior Member


Joined: 02 May 2007
Status: Offline
Points: 164
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ashok Quote  Post ReplyReply Direct Link To This Post Posted: 05 October 2007 at 6:42am
Hi Oleg,
  It works fine. Thanks a lot.
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.078 seconds.