Announcement

Collapse
No announcement yet.

Need Recommendations On Dynamic Menus

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Kev Peel
    replied
    DeleteMenu/InsertMenuItem works fine for dynamically adding/removing menu items.

    Leave a comment:


  • Dave Biggs
    replied
    I agree with Michael but if you really want to change one menu configuration for another, create two menu bars in your code and swap them as required:

    MENU NEW BAR TO hMenu1
    ....
    MENU NEW BAR TO hMenu2
    ....
    MENU ATTACH hMenu1 , hDlg ' Attach the first
    ....Swap for the second
    MENU ATTACH hMenu2 , hDlg ' ("Attach a menu to a dialog, replacing any existing menu")
    ...Swap back

    Leave a comment:


  • Michael Mattias
    replied
    I personally never liked menus which change, I much prefer menus which contain "everything," with each option always visible and in the same position on that menu. If an option is not currently active, it is disabled (which shows as grayed).

    So was that the question, what do you prefer?

    Or you wanted a hint as to how to code that style?

    To enable or disable menu items you use the EnableMenuItem() Winapi function if coding SDK-style, or the MENU SET STATE command if coding DDT-style.

    Leave a comment:


  • colin glenn
    started a topic Need Recommendations On Dynamic Menus

    Need Recommendations On Dynamic Menus

    Program I'm working on is being ported from VB, and the VB version has two different Edit menus depending on the mode the program is in. Actually, it is one edit menu, but depending on the program mode, certain elements of the menu are set to be not visible, and only the elements of the menu which pertain to the mode the program is in is visible.
Working...
X