-
June 24th, 2017, 01:35 AM
#1
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(...);
-
June 24th, 2017, 07:55 AM
#2
Re: Could anyone please tell me what the name of the system context menu is?
Originally Posted by luckiejacky
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...
Originally Posted by luckiejacky
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
-
June 26th, 2017, 01:45 PM
#3
Re: Could anyone please tell me what the name of the system context menu is?
Originally Posted by luckiejacky
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
-
June 28th, 2017, 04:43 AM
#4
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.
-
June 28th, 2017, 05:13 AM
#5
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. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. 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/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
June 28th, 2017, 05:15 AM
#6
Re: Could anyone please tell me what the name of the system context menu is?
Originally Posted by luckiejacky
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
-
June 28th, 2017, 07:32 PM
#7
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);
-
June 28th, 2017, 11:41 PM
#8
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?
-
June 29th, 2017, 12:54 AM
#9
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|