Could anyone please tell me what the name of the system context menu is?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Thread: Could anyone please tell me what the name of the system context menu is?

  1. #1
    Join Date
    Dec 2010
    Posts
    82

    Could anyone please tell me what the name of the system context menu is?

    Cannot find it in MSDN...
    I want to get the right-click context menu where you click on the desktop

    Code:
    winClass.lpszMenuName  = LoadMenu(...);

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    18,928

    Re: Could anyone please tell me what the name of the system context menu is?

    Quote Originally Posted by luckiejacky View Post
    Cannot find it in MSDN...
    I want to get the right-click context menu where you click on the desktop
    Why do you think it exists?
    This whole context menu may also be created on the fly in response to the WM_CONTEXTMENU message...

    Quote Originally Posted by luckiejacky View Post
    Code:
    winClass.lpszMenuName  = LoadMenu(...);
    What is this winClass? Is it a WNDCLASS instance?

    PS: did you try to use Spy++ to see how WM_CONTEXTMENU message in case of the desktop is sent?
    Victor Nijegorodov

  3. #3
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,568

    Re: Could anyone please tell me what the name of the system context menu is?

    Quote Originally Posted by luckiejacky View Post
    Cannot find it in MSDN...
    Who told you you could find it there? MSDN is about Windows architecture, principles and various APIs. The menu is a part of Windows Explorer that is a standalone application, closed source and has nothing to do with public APIs. Funny thing, I'm sure I already told you that thing about Windows Explorer some tima ago, a year maybe or something...
    Best regards,
    Igor

  4. #4
    Join Date
    Dec 2010
    Posts
    82

    Re: Could anyone please tell me what the name of the system context menu is?

    Hello,
    Ok, Works pretty good now.
    I've got a texture in the back, I've got the context menu, I've got the sidebar and rocketdock.
    But only missing is the icons of the desktop

    Code:
    case WM_PAINT:
    case WM_ERASEBKGND:
    	// Draw on top 
    	if (g_pd3dDevice)
    		render();
    
    	// Draw icon on top
    			 
    	break;
    This is just the message loop of the listview of the shell.
    Any ideas?
    Thanks
    Jack
    Last edited by luckiejacky; June 28th, 2017 at 04:46 AM.

  5. #5
    2kaud's Avatar
    2kaud is online now Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    5,588

    Re: Could anyone please tell me what the name of the system context menu is?

    Desktop items for the usual desktop are stored in two places.

    For Windows 7
    /users/<username>/Desktop
    /users/Public/Desktop

    As these locations have changed between OS versions, SHGetKnownFolderPath(KNOWN) can be used to get these values where KNOWN is

    FOLDERID_Desktop for <username> which gives the path to the desktop folder for the user.
    FOLDERID_PublicDesktop which gives the path to the desktop folder for public.

    See https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx
    All advice is offered in good faith only. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/

    C, C++ Compiler: Microsoft VS2017.2

  6. #6
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    18,928

    Re: Could anyone please tell me what the name of the system context menu is?

    Quote Originally Posted by luckiejacky View Post
    Hello,
    Ok, Works pretty good now.
    I've got a texture in the back, I've got the context menu, I've got the sidebar and rocketdock.
    But only missing is the icons of the desktop
    ...
    Did you try using IShellFolder::EnumObjects method to enumerate all the icons?
    See also https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx
    Victor Nijegorodov

  7. #7
    Join Date
    Dec 2010
    Posts
    82

    Re: Could anyone please tell me what the name of the system context menu is?

    Hello,
    Another Shell Programming Question,

    As things get unresponsive,

    If I set up the window procedure for the shell window (listview of the shell) using SetWindowLongPtr, the window procedure never gets a single message from the message loop, why was that?

    SetWindowLongPtr(g_hShellWindow, GWLP_WNDPROC, (LONG)WindowProc);

  8. #8
    Join Date
    Dec 2010
    Posts
    82

    Re: Could anyone please tell me what the name of the system context menu is?

    Sorry, I worked out the last one.
    But if I paint the icons after the wallpaper,
    the window procedure will paint the wallpaper and icons alternately back and forth,
    so they constantly overwriting each other on the screen.

    Should I create a surface, using SetRect? to paint on the canvas, and blit it out at one go?

  9. #9
    Join Date
    Dec 2010
    Posts
    82

    Re: Could anyone please tell me what the name of the system context menu is?

    I sort of work out the solution, here I need to create a desktop icon window above the "my" wallpaper and dreamscene and below explorer's, rocketdocks, rainmeter and everything else

    Code:
                                                                          V
    Back <---------------------------------------------------------------------------------------------> Front
         root        ori icons       my wallpaper             desktop icons             Explorer
    		   ori wp	      my dreamscene		                        Sidebar
    								                                RocketDock
    							                                        Rainmeter
    How can I make a transparent window above the listview of the shell I just previously hooked into?
    Last edited by luckiejacky; June 29th, 2017 at 12:59 AM.

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This a Codeguru.com survey!


On-Demand Webinars (sponsored)