News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Novelty menu setup.

Started by hutch--, November 14, 2016, 11:32:50 AM

Previous topic - Next topic

hutch--

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




jj2007

Quote from: hutch-- on November 14, 2016, 11:32:50 AMright justified rather than left justified.

What about simply "justified"?  ;)

hutch--

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.

jj2007

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

hutch--

This is the effect I was after.

jj2007

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:

hutch--

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.