News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

NOINVERT ON RESOURCE STATEMENTS

Started by Ratch, June 12, 2006, 04:55:40 AM

Previous topic - Next topic

Ratch

To the Ineffable All,

I have a simple set of menu accelerators, but I cannot tell any difference between using the NOINVERT parameter or leaving it off.  The documentation says that NOINVERT is to keep the top-level menu item from highlighting, but I don't see this happening even with the NOINVERT missing.  Does anyone know anything about this, or have a example of what  MS is talking about?  Ratch

POPPAD2 ACCELERATORS DISCARDABLE
BEGIN
    VK_BACK,        IDM_EDIT_UNDO,          VIRTKEY, ALT, NOINVERT
    VK_DELETE,      IDM_EDIT_CLEAR,         VIRTKEY, NOINVERT
    VK_DELETE,      IDM_EDIT_CUT,           VIRTKEY, SHIFT, NOINVERT
    VK_F1,          IDM_HELP_HELP,          VIRTKEY, NOINVERT
    VK_INSERT,      IDM_EDIT_COPY,          VIRTKEY, CONTROL, NOINVERT
    VK_INSERT,      IDM_EDIT_PASTE,         VIRTKEY, SHIFT, NOINVERT
    "^C",           IDM_EDIT_COPY,          ASCII,  NOINVERT
    "^V",           IDM_EDIT_PASTE,         ASCII,  NOINVERT
    "^X",           IDM_EDIT_CUT,           ASCII,  NOINVERT
    "^Z",           IDM_EDIT_UNDO,          ASCII,  NOINVERT
END

no-one

Ratch,
It works for me.  In my editor I have several top level menu items, FiILE, EDIT, etc.  Anyway FILE is this way &File so that ordinarily when I press ALT+F File is highlighted.  If I add the following accelerator

  "F",      IDM_FILE,           VIRTKEY, ALT

and assemble the editor, pressing ALT+F will not highlight the item.

Why anyone would want to do this, I don't know, but it works.

no-one

Ratch

no-one,
QuoteIt works for me....

     Would you post your menu and accelerator statements, or even better your whole .RC file.  I would like to examine what you have, because the same thing does not happen in my program.  Thanks Ratch

no-one

Ratch,
Okay, I am including the executable along with the resource file.  If you decide you need the entire project, just say so.  Run the executable and press ALT+F and notice that File on the menu does not highlight while ALT+E will highlight Edit.  I added two lines to the resource file to cause this to happen.  To easily find them, search for Ratch and look at the next line in each case.  Now, if I remove those two lines and re-assemble, ALT+F will highlight File as normal.

hth,
Paul


[attachment deleted by admin]

Ratch

no-one,

     I want to thank you for going to the trouble of sending me your source.  I still don't see the highlighting occur on either your program or mine.  I even tried it on my old Windows ME box.  Looks like I have gone as far as I can with this.  By the way, I notice that you use the parameter VIRTKEY on all your accelerator keys when if fact they are ASCII keys.  For instance,   "B",      IDM_SETBGCOLOR,     VIRTKEY, CONTROL, NOINVERT should probably be   "B",      IDM_SETBGCOLOR,     ASCII, CONTROL, NOINVERT or "^B",      IDM_SETBGCOLOR,     ASCII,NOINVERT or even   "VK-B",      IDM_SETBGCOLOR,     VIRTKEY, CONTROL, NOINVERT.  Anyway, thanks again for your effort.  Ratch