![]() |
How to modify menu item text |
Post Reply ![]() |
Author | |
ld88888 ![]() Newbie ![]() Joined: 11 May 2009 Status: Offline Points: 5 |
![]() ![]() ![]() ![]() ![]() Posted: 11 May 2009 at 5:11am |
OnCreate Function:
CXTPCommandBars* pCommandBars = GetCommandBars();
if(pCommandBars == NULL) { TRACE0("Failed to create command bars object.\n"); return -1; // fail to create } CXTPCommandBar* pMenuBar = pCommandBars->SetMenu(_T("Menu Bar"), IDR_MAINFRAME);
How to modify menu Item text?
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Please check samples in CommandBars folder. They have all you need.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
ld88888 ![]() Newbie ![]() Joined: 11 May 2009 Status: Offline Points: 5 |
![]() ![]() ![]() ![]() ![]() |
please tell me which sample can achieve this function? all over the samples I have run, but I haven't found the fit one. |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
For example Samples\CommandBars\Notifications uses code to add controls dynamically.
You need somehing like
pMenuBar->GetControl(0)->SetCaption("new Caption")
or
pMenuBar->GetControl(0)->GetCommandBar()->GetControl(0)->SetCaption("new Caption")
see CXTPControls/CXTPControl class description for details. |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
ld88888 ![]() Newbie ![]() Joined: 11 May 2009 Status: Offline Points: 5 |
![]() ![]() ![]() ![]() ![]() |
Thanks you very much!
|
|
![]() |
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 |