wy737 wrote:
> Hi, friend.
> Any one know how to create menu shortcut in vc++ ?
> 
> I used accelerator like below:
> 
> IDR_MAINFRAME ACCELERATORS
> BEGIN
>     "X",            ID_FILE_EXIT,           VIRTKEY, CONTROL
> END
> 
> and add some for my menu like this:
> "E&eit\tCtrl + x"
> 
> but doesn't work, even doesn't display underline ?
> How come ? some things wrong ? help please!

Well any number of things could be wrong.  The accelerator isn't being 
translated is the most likely cause.  The underline issue could be the 
OS configuration (i.e. there is a global option to turn on underlines in 
menus).  Your menu has to have the same ID as the accelerator to handle 
it correctly.  Ctrl+X may have other meanings and could be getting 
trapped by a standard UI component.

BTW, Ctrl+X is typically "Cut" (for 'cut-and-paste' operations) and 
Alt+F4 or Ctrl+F4 are generally exit and close respectively.  You should 
stick to standard behavior.  Hijacking Ctrl+X is going to be weird for 
most people.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to