CMenu to LPCONTEXTMENU
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.
Why not use resource menus? they are much easier to deal with, and they can still be manipulated.
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.
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.