![]() |
Dynamic Menu in MDI are lost when use ToolkitPro |
Post Reply
|
| Author | |
hikaroute
Groupie
Joined: 05 September 2007 Status: Offline Points: 51 |
Post Options
Thanks(0)
Quote Reply
Topic: Dynamic Menu in MDI are lost when use ToolkitProPosted: 02 November 2007 at 12:18am |
|
When I use ToolkitPro in my MDI Application, after I add Frame & Status Bar ->
That mean this menu is still hear but it's not show in the correct position, I have to use the "CXTPCommandBar* pMenuBar" to enable my menu. But my menu is the dynamic menu, I don't use it from the menu resource. How can I write the source code to do it? Because if I use the standard source code like this
----------------------------------------------------------------------------
CXTPCommandBar* pMenuBar = pCommandBars->SetMenu(
_T("Menu Bar"), IDR_MAINFRAME);
if(pMenuBar == NULL)
{
TRACE0("Failed to create menu bar.\n");
return -1; // fail to create
}
pMenuBar->SetFlags(xtpFlagAddMDISysPopup);
----------------------------------------------------------------------------
It will use only from the menu resource. But I need to enable my own current menu.
Thank you.
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 02 November 2007 at 1:53am |
|
Hello,
You have use CXTPCommandBar* pMenuBar instead your custom menu. You can create whle pMenuBar in code dynamically without using resources. or convert it from hMenu:
pMenuBar->LoadMenu(pMenu);
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
hikaroute
Groupie
Joined: 05 September 2007 Status: Offline Points: 51 |
Post Options
Thanks(0)
Quote Reply
Posted: 02 November 2007 at 4:51am |
|
Hello oleg,
I try to create the menu in the time my dynamic menu are created by use the above source code but it still use from IDR_MAINFRAME. Or If I can use LoadMenu(); function, how can I get the current Menu from my app?
Thank you.
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 02 November 2007 at 10:32am |
|
Hello, Show code you tried.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
hikaroute
Groupie
Joined: 05 September 2007 Status: Offline Points: 51 |
Post Options
Thanks(0)
Quote Reply
Posted: 07 November 2007 at 7:14am |
|
My major problem is the MDI application I'm working is too complex. After I use CXTPMenuBar from Xtreme ToolkitPro, the first time users run app but the menu don't update, but if the users call the new file command (from menu file->new then files are 2) the menu can update to the correct menubar. But it show the updated menubar always when I run it without XTP. or if I use XTP without CXTPMenuBar like the picture I showed you in the first post.
Did you ever meet the case like mine?
|
|
![]() |
|
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 |