Adding Menuitems at runtime,

This is a discussion on Adding Menuitems at runtime, within the Windows Programming forums, part of the Platform Specific Boards category; Is it possible to add menuitems during runtime using commands at runtime. If possible what is the function I should ...

  1. #1
    Registered User
    Join Date
    Jun 2002
    Posts
    24

    Adding Menuitems at runtime,

    Is it possible to add menuitems during runtime using commands at runtime.

    If possible what is the function I should use to do so.

    Any response is greatly appreciated.

    Emus21
    Keep smiling, it makes the big guys wonder what you're up to.

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Add an item with InsertMenuItem() and delete them with DeleteMenu(). Useful API routines to consider when playing with this stuff are, GetMenu() and GetSubMenu() to get handles, EnableMenuItem() enables or disables items and if you want to get deep into it, you can use GetMenuItemInfo() and SetMenuItemInfo() to do several modifcations at the same time.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    Registered User
    Join Date
    Jun 2002
    Posts
    24

    Thank you

    Thanks much, I'll try them.
    Keep smiling, it makes the big guys wonder what you're up to.

  4. #4
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,859
    If it fails to update (can't see the changes on screen) call for the menu to be redrawn with

    DrawMenuBar(hWndDlg)
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Runtime formation and execution at runtime
    By Soham in forum C Programming
    Replies: 17
    Last Post: 08-27-2008, 09:45 AM
  2. Visual Studio and .Net Runtime Framework dependency
    By George2 in forum C# Programming
    Replies: 1
    Last Post: 08-08-2007, 08:52 AM
  3. SVN Import Causes Crash
    By Tonto in forum Tech Board
    Replies: 6
    Last Post: 11-01-2006, 03:44 PM
  4. FILES in WinAPI
    By Garfield in forum Windows Programming
    Replies: 46
    Last Post: 10-02-2003, 07:51 PM
  5. adding menus at runtime
    By bennyandthejets in forum Windows Programming
    Replies: 3
    Last Post: 11-22-2002, 05:07 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21