NO

Author Topic: right aligned shortcut key in menu item  (Read 12379 times)

czerny

  • Guest
Re: right aligned shortcut key in menu item
« Reply #15 on: August 19, 2014, 12:14:01 PM »
Like this.
Yes! What have you done?

JohnF

  • Guest
Re: right aligned shortcut key in menu item
« Reply #16 on: August 19, 2014, 12:20:33 PM »
That is exactly what that app does.

Note the "&Copy\tC"

Code: [Select]
AppendMenu(hSubMenu, MF_STRING, MENU_EDIT_CUT, TEXT("Cu&t\tCtrl+X"));
AppendMenu(hSubMenu, MF_STRING, MENU_EDIT_COPY, TEXT("&Copy\tC"));

John

czerny

  • Guest
Re: right aligned shortcut key in menu item
« Reply #17 on: August 19, 2014, 12:41:32 PM »
That is exactly what that app does.

I have not compiled your SmallEd2 example and we have different looks. Doesn't that mean that it is OS dependent?

I am working here with XP SP3.

JohnF

  • Guest
Re: right aligned shortcut key in menu item
« Reply #18 on: August 19, 2014, 01:10:20 PM »
That is exactly what that app does.

I have not compiled your SmallEd2 example and we have different looks. Doesn't that mean that it is OS dependent?

I am working here with XP SP3.

Yes, I just tried it on an old XP - it is not working the same. Don't know what to suggest.

John

czerny

  • Guest
Re: right aligned shortcut key in menu item
« Reply #19 on: August 19, 2014, 01:53:31 PM »
So the question arises: How can you left-align your shurtcuts?

Here (XP SP3) Pelles C ide shurtcuts are right-aligned and per example notepad is left-aligned. So there should be a difference. Do you have any differences?

Could anybody else try the SmallEd2 example and look at the edit menu?

czerny

  • Guest
Re: right aligned shortcut key in menu item
« Reply #20 on: August 19, 2014, 04:13:13 PM »
Code: [Select]
sprintf(MenuItem, "%s%cCtrl-X", "Example", 8); // works!Though
Code: [Select]
'\a' == 7 a value of 8 is working.
'\b' is working too!
« Last Edit: August 19, 2014, 04:23:35 PM by czerny »

Offline jj2007

  • Member
  • *
  • Posts: 536
Re: right aligned shortcut key in menu item
« Reply #21 on: August 19, 2014, 05:13:58 PM »
Ascii 7 doesn't work on XP SP3 (inserts a black dot),
8 means right-aligned,
9 means left-aligned.

Now the question is how it works on Win 7 + 8...

JohnF

  • Guest
Re: right aligned shortcut key in menu item
« Reply #22 on: August 19, 2014, 05:22:30 PM »
On Win7 \t and \b work the same, right aligned.

John