Thread: CheckMenuItem do nothing...

  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: [email protected]

  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,868
    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