Checkmarked menu items

This is a discussion on Checkmarked menu items within the Windows Programming forums, part of the Platform Specific Boards category; Hi, i was wondering if anyone could point me to a tutorial or give a crash course on how i ...

  1. #1
    Registered User -leech-'s Avatar
    Join Date
    Nov 2001
    Posts
    54

    Checkmarked menu items

    Hi, i was wondering if anyone could point me to a tutorial or give a crash course on how i can get checkmarked menu items to work. I'm using VC++. I'd like to know how i can enable/disable an option just be RECLICKING on the same item instead of being stuck in the same position. This kight also tie in to how to make the checkmark appear/disappear.

    Thanks.
    Not yet, have to think of one...

  2. #2
    Registered User
    Join Date
    Aug 2001
    Posts
    223

    checkin or unchecking menu item

    look for help with


    //********************h file
    afx_msg void OnUpdtateMyItem(CCmdUI* pCmdUI);



    //************************cpp file

    ON_UPDATE_COMMAND_UI(IDC_MYITEM, OnUpdateMyItem)


    void CMainFrame::OnUpdtateMyItem(CCmdUI * pCmdUI)
    {
    pCmdUI->SetCheck( bMyCondition == TRUE ? 1 : 0 );
    }
    zMan

  3. #3
    Registered User -leech-'s Avatar
    Join Date
    Nov 2001
    Posts
    54
    Actually, i'm doing this through the API (not MFC) using C.

    Thanks anyways
    Not yet, have to think of one...

  4. #4
    Registered User WayTooHigh's Avatar
    Join Date
    Aug 2001
    Posts
    101
    use GetMenu() to get the menu's handle. then use CheckMenuItem() to check a certain item.
    Sometimes, the farthest point from the center is the center itself.

    Your life is your canvas, it's only as beautiful as you paint it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 03-05-2009, 09:25 AM
  2. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  3. HELP!!!!emergency Problem~expert please help
    By unknowppl in forum C++ Programming
    Replies: 9
    Last Post: 08-21-2008, 06:41 PM
  4. HELP!!!!emergency ~expert please help
    By unknowppl in forum C Programming
    Replies: 1
    Last Post: 08-19-2008, 07:35 AM
  5. Best "Menu" method?
    By SSJMetroid in forum Game Programming
    Replies: 11
    Last Post: 12-07-2005, 11:05 PM

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