Download Source Code

CTrayIcon Class Reference

Provides simple functions for adding tray icon support. More...

#include <TrayIcon.h>

List of all members.

Public Member Functions

 CTrayIcon ()
 Constructor.
virtual ~CTrayIcon ()
 Destructor.

Static Public Member Functions

static BOOL ShowPopupMenu (HWND hParent, LPCTSTR pMenu, long x=-1, long y=-1, long nSub=0, HINSTANCE hInstance=NULL)
 Call to display a popup window on the tray.
static BOOL Remove (HWND hWnd, UINT uMsg)
 Removes the tray icon.
static BOOL Add (HWND hWnd, UINT uMsg, HICON hIcon, LPCTSTR tip, DWORD flags=0)
 Adds icon to tray.


Detailed Description

Provides simple functions for adding tray icon support.

Simple functions for adding tray icons to the windows taskbar tray.


Member Function Documentation

BOOL CTrayIcon::Add HWND  hWnd,
UINT  uMsg,
HICON  hIcon,
LPCTSTR  tip,
DWORD  flags = 0
[static]
 

Adds icon to tray.

Parameters:
[in] hWnd - Parent window handle
[in] uMsg - Tray icon message id
[in] hIcon - Handle to icon displayed in tray
[in] tip - Tooltip for tray icon
[in] flags - Tray icon flags
Returns:
See also:

BOOL CTrayIcon::Remove HWND  hWnd,
UINT  uMsg
[static]
 

Removes the tray icon.

Parameters:
[in] hWnd - Parent window
[in] uMsg - Tray icon message id
Returns:
Non-zero if success
See also:

BOOL CTrayIcon::ShowPopupMenu HWND  hParent,
LPCTSTR  pMenu,
long  x = -1,
long  y = -1,
long  nSub = 0,
HINSTANCE  hInstance = NULL
[static]
 

Call to display a popup window on the tray.

Parameters:
[in] hParent - Parent window handle
[in] pMenu - Menu resource id
[in] x - Horzontal position to display menu
[in] y - Vertical position to display menu
[in] nSub - Sub menu index
[in] hInstance - Module containing the menu in pMenu
Returns:
Non-zero if success
See also:


The documentation for this class was generated from the following files:
  • inc/TrayIcon.h
  • TrayIcon.cpp
Copyright Robert Umbehant
This documentation is covered by the LGPL