![]() |
How to modify menu item text |
Post Reply
|
| Author | |
ld88888
Newbie
Joined: 11 May 2009 Status: Offline Points: 5 |
Post Options
Thanks(0)
Quote Reply
Topic: How to modify menu item textPosted: 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
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 12 May 2009 at 2:14am |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 12 May 2009 at 11:04am |
|
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
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 12 May 2009 at 3:38pm |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 14 May 2009 at 6:27am |
|
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 |