CheckMenuItem do nothing...

This is a discussion on CheckMenuItem do nothing... within the Windows Programming forums, part of the Platform Specific Boards category; I'm making a program in Visual C++ 6.0. I have a menu with the ID ID_MENU. I have some menu ...

  1. #1
    satboog
    Guest

    Question CheckMenuItem do nothing...

    I'm making a program in Visual C++ 6.0.
    I have a menu with the ID ID_MENU.
    I have some menu items that i would like to check and uncheck but the function CheckMenuItem doesn't make that change, Why?

    I do like this:
    CheckMenuItem(ID_MENU, ID_OPTION1, MF_CHECK);

    This line of code is associated with a key event.

    ID do Menu: ID_MENU
    ID do item to check or uncheck: ID_OPTION1
    option: MF_CHECK or MF_UNCHECK or ...

    can someone help me?
    thanx...

    email: satboog@iol.pt

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    One solution is SetCheck().

    Kuphryn

  3. #3
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,856
    CheckMenuItem(ID_MENU, ID_OPTION1, MF_CHECK);

    the first param is the menus HWND not ID. Use GetMenu()
    "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

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