Results 1 to 5 of 5

Thread: How to use this function

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2009
    Posts
    76

    How to use this function

    I want to use this function in my program

    EnableMenuItem Function - http://msdn.microsoft.com/en-us/libr...36(VS.85).aspx

    any ideas how to use it, i am trying to edit right click explorer context menu
    < advertising link removed by moderator >

  2. #2
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Re: How to use this function

    vb Code:
    1. Private Declare Function EnableMenuItem _
    2.      Lib "user32" ( _
    3.           ByVal menu As IntPtr, _
    4.           ByVal ideEnableItem As Integer, _
    5.           ByVal enable As Integer _
    6.     ) As Integer

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2009
    Posts
    76

    Re: How to use this function

    Can you tell me what should i use in the first argument If I want to modify Windows Explorer Context Menu

    I think calss ID of this menu is 32770
    < advertising link removed by moderator >

  4. #4
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Re: How to use this function

    You need to provide a window handle (HMENU) to the menu where you try to enable the element.
    I might be wrong since I have not been using Win32API often lately.
    I think you need to get a window handle of the explorer (FindWindow function)
    Then I think you should call GetMenu Api to obtain a menu handle.
    I don't know whether it would work with a popup menu or not.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Sep 2009
    Posts
    76

    Re: How to use this function

    hmmthanks for your help will try it and revert back soon
    < advertising link removed by moderator >

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