Author Topic: Novelty menu setup.  (Read 1655 times)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 5852
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Novelty menu setup.
« 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



hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

jj2007

  • Member
  • *****
  • Posts: 8776
  • Assembler is fun ;-)
    • MasmBasic
Re: Novelty menu setup.
« Reply #1 on: November 14, 2016, 12:06:05 PM »
right justified rather than left justified.

What about simply "justified"?  ;)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 5852
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Novelty menu setup.
« Reply #2 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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

jj2007

  • Member
  • *****
  • Posts: 8776
  • Assembler is fun ;-)
    • MasmBasic
Re: Novelty menu setup.
« Reply #3 on: November 14, 2016, 08:49:30 PM »
From 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--

  • Administrator
  • Member
  • ******
  • Posts: 5852
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Novelty menu setup.
« Reply #4 on: November 14, 2016, 11:13:26 PM »
This is the effect I was after.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

jj2007

  • Member
  • *****
  • Posts: 8776
  • Assembler is fun ;-)
    • MasmBasic
Re: Novelty menu setup.
« Reply #5 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:

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 5852
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Novelty menu setup.
« Reply #6 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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin: