The MASM Forum

Microsoft 64 bit MASM => MASM64 SDK => Topic started by: hutch-- on November 14, 2016, 11:32:50 AM

Title: Novelty menu setup.
Post by: hutch-- on November 14, 2016, 11:32:50 AM
I had a play with this and it appears to work OK on western language Windows 10 64 bit versions, set the flag MFT_RIGHTORDER which turns around the menu layout to right to left languages like Arabic and Hebrew then re-arrange your menu topics in reverse order and you get a western type menu that is right justified rather than left justified.

100   MENUEX
BEGIN
    POPUP "&Help", ,MFT_RIGHTORDER, 0
    BEGIN
        MENUITEM "About\tF1", 300
    END

    POPUP "&Edit", , , 0
    BEGIN
        MENUITEM "&Undo\tCtrl+Z", 200
        MENUITEM "&Redo\tCtrl+Y", 201
        MENUITEM "", , MFT_SEPARATOR
        MENUITEM "&Cut\tCtrl+X", 202
        MENUITEM "Copy\tCtrl+C", 203
        MENUITEM "&Paste\tCtrl+V", 204
        MENUITEM "", , MFT_SEPARATOR
        MENUITEM "Clear\tDel", 205
    END
   
    POPUP "&File", , , 0
    BEGIN
        MENUITEM "&New",  101
        MENUITEM "", , MFT_SEPARATOR
        MENUITEM "&Open", 102
        MENUITEM "", , MFT_SEPARATOR
        MENUITEM "&Save", 103
        MENUITEM "", , MFT_SEPARATOR
        MENUITEM "&Exit", 125
    END

END



Title: Re: Novelty menu setup.
Post by: jj2007 on November 14, 2016, 12:06:05 PM
Quote from: hutch-- on November 14, 2016, 11:32:50 AMright justified rather than left justified.

What about simply "justified"?  ;)
(http://www.webalice.it/jj2006/pics/RmMenu2.jpg)
Title: Re: Novelty menu setup.
Post by: hutch-- on November 14, 2016, 12:09:29 PM
Sad to say that is not telling me much. I waded through the "MFT_" series of menu styles and tested out one I had not bothered to try before.

From your image, you are writing the menu on the titlebar which is most probably a different animal.
Title: Re: Novelty menu setup.
Post by: jj2007 on November 14, 2016, 08:49:30 PM
Quote from: hutch-- on November 14, 2016, 12:09:29 PMFrom your image, you are writing the menu on the titlebar which is most probably a different animal.

The titlebar is a different animal indeed (I hate wasting one line for a menu). The menu itself is the interesting part:

   db "[Edit & Format]", crlf, "Undo",8,"Alt Bs,", crlf, "Cut",8,"Ctrl X,", crlf, "Copy",8,"Ctrl C,", crlf, "Paste",8,"Ctrl V,", crlf, "-,", crlf,
        "&Red", 8, "Ctrl E,", crlf, "&Green,", crlf, "Blue", 8, "Ctrl Shift B,", crlf, "-,", crlf

I owe this trick to czerny' thread right aligned shortcut key in menu item (http://forum.pellesc.de/index.php?topic=6370.0)
Title: Re: Novelty menu setup.
Post by: hutch-- on November 14, 2016, 11:13:26 PM
This is the effect I was after.
Title: Re: Novelty menu setup.
Post by: jj2007 on November 14, 2016, 11:27:29 PM
I see: The menu titles also on the right. Interesting. Now you could test if you can have two menus, one to the left, the other to the right :biggrin:
Title: Re: Novelty menu setup.
Post by: hutch-- on November 14, 2016, 11:49:39 PM
Its an easy enough option to set up, just make 2 menus and switch between them. With the choice of doing the MFT_RIGHTORDER flag or not, you can do either left or right but not both. If you don't mind the left justification you can separate left and right with the right justify flag but the popup will be aligned to the left as normal. Now with the separate popups you are using, it may be worth a try setting the popup with the MFT_RIGHTORDER flag so that you place the top location on the title bar as you are currently doing but have a popup that is reversed like the image I posted.