Task Bar Menus for running app

I just wondered if there was a way to create a ‘right click’ menu on the task bar for a running application (ie if I right click on chrome I can launch a ‘new window’ etc… I just want to easily set a global variable using a right click… thanks

I think you can do it using Winevent


Probably subclass the procedure to trap the mouse events over the toolbar region and use the popup menu class.

The toolbar is limited in some ways, I think its classed as a Non Client Area like you can only have buttons but I know I’ve put more than buttons on the toolbar in C6, but not tried anything since.

Using Toolbar Controls - Win32 apps | Microsoft Docs

How to Embed Nonbutton Controls in Toolbars - Win32 apps | Microsoft Docs

Toolbars support only buttons; therefore, if your application requires a different kind of control, you must create a child window. The following illustration shows a toolbar with an embedded edit control.

WM_NCRBUTTONDOWN message (Winuser.h) - Win32 apps | Microsoft Docs

Nonclient Area - Win32 apps | Microsoft Docs

The system sends a WM_NCPAINT message to the window whenever a part of the nonclient area of the window, such as the title bar, menu bar, or window frame, must be updated.

WNDPROC - Win32 apps | Microsoft Docs

Responding to Mouse Clicks - Win32 apps | Microsoft Docs

If Winevent does popup menus for the status bar at the bottom, then it might also handle the toolbar and other non client areas. I dont have winevent so someone else will probably clarify.

Windows 7 added a lot of Taskbar improvements and APIs. Maybe a Taskbar “Jump List” would be what you want.


Here are some links that may help, search for “Jump”