![]() |
Menu hot key doesn't appear |
Post Reply
|
| Author | |
Void666
Newbie
Joined: 28 January 2008 Location: United Kingdom Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
Topic: Menu hot key doesn't appearPosted: 28 January 2008 at 5:26am |
|
Hi,
Can you please explain following issue: I am creating menu item manually using approximate following code in class derived from CXTPMenuBar: CMenu menu; menu.CreateMenu(); MENUITEMINFO mii; memset( &mii, 0x0, sizeof(MENUITEMINFO) ); static char* t1 = "Test Item\tCtrl+T"; mii.cbSize = sizeof(MENUITEMINFO); mii.fMask = MIIM_ID | MIIM_TYPE; mii.dwItemData = (ULONG_PTR)item; mii.wID = 0x0100; mii.fType = MFT_STRING; mii.dwTypeData = t1; mii.cch = (UINT)strlen(t1); InsertMenuItem( menu.m_hMenu, 0x0100, FALSE, &mii ); CXTPCommandBar::LoadMenu( &menu, TRUE ); Result: text "Ctrl+T" doesn't appear in menu item. Why? Thanks! |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 January 2008 at 7:02am |
|
I very recommend instead of creating HMENU and then convert it to CommandBar controls, create CommandBar controls at first.
CXTPControl* pControl = GetControls()->Add(xtpControlButton, 0x0100);
pControl->SetCaption("Test Item");
pControl->SetDescription(...):
pControl->SetShortcutText(...);
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Void666
Newbie
Joined: 28 January 2008 Location: United Kingdom Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 January 2008 at 7:12am |
|
Thanks, I will try it.
Спасибо :) |
|
![]() |
|
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 |