EnableMenuItem

This is a discussion on EnableMenuItem within the Windows Programming forums, part of the Platform Specific Boards category; I have a quick question concerning Menus. I have a small app that uses pull-down menus, and I ned to ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    16

    Question EnableMenuItem

    I have a quick question concerning Menus. I have a small app that uses pull-down menus, and I ned to be able to "turn off" or grey out the menu items that I dont want a user to have. I am trying to use the function:

    EnableMenuItem(HMENU hMenu, UINT uIDEnableItem, UINT uEnable);

    The problem is i dont know how to get the Handle of hMenu. I have tried just giving it the resource number, but that didnt work. What am I doing wrong??

    - Brice

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    16
    I got it....i was doing some reading on here and I came across a post that had some code that worked for what I needed.

    I just used GetMenu(HWND) to get a HMENU handle to the menu I need. Thanks anyways.

    - Brice



Popular pages Recent additions subscribe to a feed

Similar Threads

  1. EnableMenuItem has no affect
    By Gerread in forum Windows Programming
    Replies: 3
    Last Post: 04-28-2007, 02:47 AM
  2. clipboard
    By jimjamjahaa in forum C++ Programming
    Replies: 1
    Last Post: 08-04-2005, 05:26 PM
  3. Text box default contextmenu
    By ChadJohnson in forum Windows Programming
    Replies: 6
    Last Post: 03-28-2005, 01:44 PM
  4. A Problem with DialogBox()
    By EvBladeRunnervE in forum Windows Programming
    Replies: 5
    Last Post: 02-04-2003, 10:14 PM

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