GetMenu() returns NULL |
Post Reply |
Author | |
Asha Udupa
Newbie Joined: 04 February 2004 Status: Offline Points: 12 |
Post Options
Thanks(0)
Posted: 12 April 2004 at 5:29am |
Hi I have written this in Mainframe.cpp CXTPCommandBar* pMenuBar = GetCommandBars()->SetMenu(_T("Menu Bar"), IDR_MAINFRAME); Now if I use GetMenu() it returns NULL. I want to append an item dynamically to the existing menu. Could anyone please help me?
Regards Asha
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
pMenuBar->GetControls()->Add(...);
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Asha Udupa
Newbie Joined: 04 February 2004 Status: Offline Points: 12 |
Post Options
Thanks(0)
|
Thanks for the infrmation. Actually I want to append the menu to sub menu. dmething like: View->Control bar->x,y-Append the menu here. How can I dothis using Add() command?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
CXTPControlPopup* pControlView = (CXTPControlPopup*)pMenuBar->GetControl(3); pControlView->GetCommandBar()->GetControls()->Add(. .)
you can add it dynamically. See DynamicPopups sample
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Asha Udupa
Newbie Joined: 04 February 2004 Status: Offline Points: 12 |
Post Options
Thanks(0)
|
Thanks for the reply. Still I have a problem pControlViewNew->GetCommandBar()->GetControls()->Ad d(xtpControlButton,ID_FILE_NEW); works but pControlViewNew->GetCommandBar()->GetControls()->Ad d(xtpControlButton, 10, "New", -1, false); doesn't work. How can I make 2nd statement working?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
What doesn't work? "New" is parameter string. you must call pControl->SetCaption(...). |
|
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 |