Results 1 to 2 of 2

Thread: Check Menu Item

  1. #1

    Thread Starter
    Registered User Olly's Avatar
    Join Date
    Apr 2001
    Location
    Switzerland
    Posts
    252

    Check Menu Item

    I've added an item to the control menu of a form.
    How can I check this item?
    I've tried CheckMenuItem but this needs the id of the Item I added but I don't know how to get It. I also tried tu use GetMenuItemId but this again needs some identification number.
    Can someone hlp me out?
    (I know I'm spamming a bit with these hardcore questions today )

  2. #2

    Thread Starter
    Registered User Olly's Avatar
    Join Date
    Apr 2001
    Location
    Switzerland
    Posts
    252

    Ha!

    Already found it out myself
    first u get the control menuitem id:

    itemID = GetMenuItemID(GetSystemMenu(frmMain.hwnd, 0&), 8)
    '8 is the index of the item (counting starts from 0)

    then u check it:
    CheckMenuItem GetSystemMenu(frmMain.hwnd, 0&), itemID, MF_CHECKED

    YESSSSS


    Sorry for all who were bothered by that

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width