We help IT Professionals succeed at work.

how can i add my own program to the system menu? (right click on title bar)

Icu
Icu asked
on
353 Views
Last Modified: 2010-04-17
Is there a way either through writing a program, or preferrably adding something inside the registry that I can add my own program to the system menu? (the menu when you right click on the title bar in windows, eg:  restore, move, size, minimize, maximize, close.)

I want to add a "Stay on Top" feature.
But all I seem to find on the internet is how to add items to explorer's context menu.

Can anyone help?
Comment
Watch Question

Commented:
You should probably go to the Community section and request to move this to one of the Programming Topic Areas... better chance of getting someone who focuses on your kind of issue.

Good luck!

ChrisPy
Icu

Author

Commented:

Thanks for the suggestion, the request is in.

Commented:
Icu>  As a programmer I can tell you that some functions in MS Windows cannot be changed, they are "hardcoded" for the most part and not configurable through a registry entry.

That doesn't mean that this problem cannot be solved, but be warned that you may not receive the answer you want.


If you were writing your own program I could suggest that you look at the Windows API for setting the zOrder. The window with the zOrder of 0 is the top most window.   The function "Show Desktop" sets the desktop window's zOrder (hWnd ID: 0) to 0.

just a thought....

Commented:
I saw a sidebar in the April '04 PC World (or was it PC Magazine) about a tool that will add buttons next to the Min, Max, and Close buttons for Always on Top, Shade (show titlebar only, like on a Mac), and a few other things.  

http://www.pcworld.com
http://www.pcmagazine.com

As soon as I find my copy of the magazine, I'll get you the name of this program.

Commented:
There are programs that will modify the behavior of DefWndProc (the windows API function that provides the basic windowing functionality of 99% of all windows programs). Winshades is an example of this. However I BELIEVE (I could be wong) that the system modifaction required for that renders your Windows Installation Unsupported by Microsoft.

However as mentioned above if you are making your own program you can add this functionality to only your program no problem.
Icu

Author

Commented:
Thanks for all the help so far, but I do want this functionality for all open windows, not just for a single program.
JohnK813 seems to be the closest to providing me with a solution.

But I would prefer some type of source code showing how to do this for all windows programs, not just a specific one. (any coding language is fine eg: c/c++/java/perl/python/.net/VB...)
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Icu

Author

Commented:
JohnK813

The way that program works is it adds it's own separate buttons into the title bar of the program, not actually into the system menu. And even though that's not what I was expecting it's a perfectly good solution.
So you'll definitely get some of the points and if the correct solutions isn't posted in a couple days you'll get them all.

Thanks for tracking that down.
Icu

Author

Commented:
Ok, I found c++ source that does what I was wanting but due to quick clicking I don't know where it came from or who wrote it. So if your interested you can get the source here but I make no claim to it.

http://alan.intercite.net/downloads/always_on_top_system_menu.zip

Also if anyone else finds source in any other languages please post a link.

John you can have the points thanks for you help.

Commented:
Glad I could help, at least to some extent.  Thanks for the points.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.