Thread: Menu's

  1. #1
    Registered User
    Join Date
    Nov 2003


    Iam making a menu through code. I have created a handle to a menu at the top and drop down menus (e.g. File, Edit etc.) I attach the menu to a window created by CreateWindowEx. Having one menu makes no problems. When I added a second dropdown menu (edit menu beside file) the menu's are not functioning properly. How should I create a menu?

    I do this to add a menu item to a menu such as file

    AppendMenu(mnuFile, MF_STRING, mnuNew, "New CTRL+N");

    for the menu creating I do this

    mnuEdit = CreatePopupMenu();
    mnuHead = CreateMenu(); //What I attach everything too
    mnuFile = CreatePopupMenu();

    to attach it all to mnuHead

    AppendMenu(mnuHead, MF_POPUP | MF_STRING, (UINT)mnuFile, "File");
    AppendMenu(mnuHead, MF_POPUP | MF_STRING, (UINT)mnuFrames, "Frames");

    Then I pass mnuHead for the menu parameter in CreateWindowEx. The menu's function properly when there is one menu (file or edit) but when there is more than one menu I have to click and move my cursor over a menu item for all of them to apear. How can I fix this?

    Thanx in advance!

  2. #2
    Emotionally Unstable DarkViper's Avatar
    Join Date
    Oct 2002
    i remember doing it that way back when i had Bloodshed and was forced, but dont you think it would be easyer and more productive if you just used a Resource Editor? or do you have access to one?

    just my two cents because im in a hurry...
    ~DJ DarkViper signing out
    My Site:
    Black Jaguar Studios

    Fluent English, Starter German, HTML, Javascript, Actionscript, Intermediate PHP

    Verteran Despiser of: ASP, Java, BASIC, Pascal, Cobalt

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Win32 menus and resources help
    By firestorm in forum Windows Programming
    Replies: 24
    Last Post: 04-12-2005, 01:23 PM
  2. Creating pop up menus
    By Ti22 in forum C++ Programming
    Replies: 22
    Last Post: 01-18-2005, 09:27 PM
  3. help with menus example?
    By The Gweech in forum Windows Programming
    Replies: 3
    Last Post: 03-30-2004, 04:41 PM
  4. adding menus at runtime
    By bennyandthejets in forum Windows Programming
    Replies: 3
    Last Post: 11-22-2002, 05:07 AM
  5. menus
    By iain in forum Windows Programming
    Replies: 10
    Last Post: 08-18-2001, 03:03 AM