CMenu to LPCONTEXTMENU

This is a discussion on CMenu to LPCONTEXTMENU within the Windows Programming forums, part of the Platform Specific Boards category; Greetings, I seem to in a bit of a bind. I created a menu using the CMenu class inside a ...

  1. #1
    Codebot
    Join Date
    Jun 2004
    Location
    Toronto
    Posts
    195

    CMenu to LPCONTEXTMENU

    Greetings,

    I seem to in a bit of a bind. I created a menu using the CMenu class inside a non-MFC application. It is not drawing correctly because I dont know how to handle the WM_INITMENUPOPUP case. I am wondering if there is a way to get the a LPCONTEXTMENU from the CMenu class so that I could call LPCONTEXTMENU::HandleMenuMsg() on it.

    Any suggestions are appreciated.
    Founder and avid member of the Internationsl Typo Associateion

  2. #2
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    1,689
    Why not use resource menus? they are much easier to deal with, and they can still be manipulated.
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

  3. #3
    Codebot
    Join Date
    Jun 2004
    Location
    Toronto
    Posts
    195
    Because I populate the menu by polling a shellview. The menu is created with the same items as if you would right click on a file or explorer window. The example I am basing it off of uses LPCONTEXTMENU types but my code originally used CMenu classes.
    Founder and avid member of the Internationsl Typo Associateion

  4. #4
    Codebot
    Join Date
    Jun 2004
    Location
    Toronto
    Posts
    195
    Essentially what I am trying to do is populate my CMenu with items from the explorer context menu. The problem is that I do not get a "New" submenu when I get the context menu of the desktop (By getting the PIDL of the desktop, as a virtual folder).

    The desktop PIDL (virtual) gives me a menu without New. The desktop PIDL (C:\documents and settings\User\Desktop) gives me the New submenu but the properties menuitem gives me the properties of that folder, rather then giving me the display options.
    Founder and avid member of the Internationsl Typo Associateion

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with hiding CMenu in MS-VS C++ 6
    By streetd in forum Windows Programming
    Replies: 1
    Last Post: 09-06-2002, 05:27 PM

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