Fog Creek Software
Discussion Board




Windows taskbar menu thingy

I'm looking to create a custom icon that will be placed in the lower right side of the standard Windows toolbar. I'm not sure what the official name of the tray is, but it's where background-running applications often drop an icon, like anti-virus and firewall apps.

Is there a name for that tray?

More specifically, is there a way to customize the menu that appears when right-clicking the icon? I'd like to show a small image if possible.

This seems like a silly question, but it's hard to search on google without the official terminology.

Thanks,

Edward
Monday, April 05, 2004

"Is there a name for that tray?"

It's called the "notification area".  The original (early) name for the task bar was the "tray".  So the full name of that area was called the "tray notification area".  Which, not surprisingly, got shortened to the "tray" by developers and users.

Everyone, including myself, always call it the tray.  Icons in there are called tray icons.  Using that terminology you should be able to find what you want.

What happens when the icon is clicked is up to you -- you can open a menu, or dialog, or an application, or do anything you want.

Almost Anonymous
Monday, April 05, 2004

Many thanks...whoever you are...

Edward
Monday, April 05, 2004

"System Tray"

Bleh
Monday, April 05, 2004

An interesting article on what the official name is (apparently it is the "Taskbar Notification Area"):
http://weblogs.asp.net/oldnewthing/archive/2003/09/10/54831.aspx

And a place on MSDN to start at the Win32 API level: (search for "Adding, Modifying, and Deleting Icons in the Status Area" and chuckle that they used yet another name for it)

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_int/shell_int_programming/taskbar.asp

WinForms and Delphi among others have higher level APIs to access it as well.

Chris Altmann
Monday, April 05, 2004

Thanks Chris, that'll be helpful.

Edward
Monday, April 05, 2004


I've also seen it referred to as the "icon tray".

Mark Hoffman
Monday, April 05, 2004

Hence my googling difficulties ;-)

Edward
Monday, April 05, 2004

Hi,

Be sure to catch the WM_TASKBAR_CREATE
message in your application to re-add your tray icon
after explorer.exe crashes and restarts... :-)

A beautiful day
Tuesday, April 06, 2004

mmm, you should use something like:

int WM_TASKBAR_CREATE = RegisterWindowMessage("TaskbarCreated");

'TaskbarCreated' is a global message send by explorer.exe when it restarts.

A beautiful day
Tuesday, April 06, 2004

Unless you are doing user support in which case I just say, "look in the clock".

Craig
Tuesday, April 06, 2004


Systray

Engineer
Tuesday, April 06, 2004

'Why do some people call the taskbar the "tray"?'
http://blogs.gotdotnet.com/raymondc/permalink.aspx/5a811e6f-cd12-48de-8994-23409290faea

Duncan Smart
Wednesday, April 07, 2004

*  Recent Topics

*  Fog Creek Home