mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
implementation of volume control tray icon
svn path=/trunk/; revision=8750
This commit is contained in:
parent
41562afcd3
commit
fda8c77b11
10 changed files with 208 additions and 15 deletions
|
@ -3,7 +3,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td><address style="align: right;"><small>
|
<td><address style="align: right;"><small>
|
||||||
ROS Explorer Source Code Documentation
|
ROS Explorer Source Code Documentation
|
||||||
<br>generated on 14.03.2004 by <a href="http://www.doxygen.org/index.html">
|
<br>generated on 15.03.2004 by <a href="http://www.doxygen.org/index.html">
|
||||||
<img src="doxygen.png" alt="doxygen" align="middle" border=0>
|
<img src="doxygen.png" alt="doxygen" align="middle" border=0>
|
||||||
</small></address>
|
</small></address>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -494,6 +494,10 @@ SOURCE=.\res\search.ico
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\res\speaker.ico
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\res\startmenu.ico
|
SOURCE=.\res\startmenu.ico
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#define IDS_STARTMENU 32
|
#define IDS_STARTMENU 32
|
||||||
#define IDS_MINIMIZE_ALL 33
|
#define IDS_MINIMIZE_ALL 33
|
||||||
#define IDS_DESKTOP_NUM 34
|
#define IDS_DESKTOP_NUM 34
|
||||||
|
#define IDS_VOLUME 35
|
||||||
#define IDI_REACTOS 100
|
#define IDI_REACTOS 100
|
||||||
#define IDI_EXPLORER 101
|
#define IDI_EXPLORER 101
|
||||||
#define IDI_STARTMENU 102
|
#define IDI_STARTMENU 102
|
||||||
|
@ -75,6 +76,7 @@
|
||||||
#define IDI_NETWORK 148
|
#define IDI_NETWORK 148
|
||||||
#define IDI_COMPUTER 149
|
#define IDI_COMPUTER 149
|
||||||
#define IDM_DESKTOPBAR 150
|
#define IDM_DESKTOPBAR 150
|
||||||
|
#define IDM_VOLUME 151
|
||||||
#define IDD_DESKBAR_TASKBAR 153
|
#define IDD_DESKBAR_TASKBAR 153
|
||||||
#define IDB_ICON_ALIGN_0 153
|
#define IDB_ICON_ALIGN_0 153
|
||||||
#define IDD_DESKBAR_STARTMENU 154
|
#define IDD_DESKBAR_STARTMENU 154
|
||||||
|
@ -87,6 +89,7 @@
|
||||||
#define IDB_ICON_ALIGN_7 160
|
#define IDB_ICON_ALIGN_7 160
|
||||||
#define IDB_ICON_ALIGN_8 161
|
#define IDB_ICON_ALIGN_8 161
|
||||||
#define IDB_ICON_ALIGN_9 162
|
#define IDB_ICON_ALIGN_9 162
|
||||||
|
#define IDI_SPEAKER 162
|
||||||
#define IDB_ICON_ALIGN_10 163
|
#define IDB_ICON_ALIGN_10 163
|
||||||
#define IDB_LOGOV16 164
|
#define IDB_LOGOV16 164
|
||||||
#define ID_VIEW_NAME 401
|
#define ID_VIEW_NAME 401
|
||||||
|
@ -137,9 +140,11 @@
|
||||||
#define ID_STOP 40009
|
#define ID_STOP 40009
|
||||||
#define ID_MINIMIZE_ALL 40010
|
#define ID_MINIMIZE_ALL 40010
|
||||||
#define ID_EXPLORE 40011
|
#define ID_EXPLORE 40011
|
||||||
#define ID_SWITCH_DESKTOP_1 50000
|
|
||||||
#define ID_TASKMGR 40012
|
#define ID_TASKMGR 40012
|
||||||
#define ID_BROWSE_UP 40013
|
#define ID_BROWSE_UP 40013
|
||||||
|
#define ID_TRAY_VOLUME 40014
|
||||||
|
#define ID_VOLUME_PROPERTIES 40015
|
||||||
|
#define ID_SWITCH_DESKTOP_1 50000
|
||||||
#define ID_WINDOW_NEW 0xE130
|
#define ID_WINDOW_NEW 0xE130
|
||||||
#define ID_WINDOW_ARRANGE 0xE131
|
#define ID_WINDOW_ARRANGE 0xE131
|
||||||
#define ID_WINDOW_CASCADE 0xE132
|
#define ID_WINDOW_CASCADE 0xE132
|
||||||
|
@ -156,8 +161,8 @@
|
||||||
//
|
//
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 161
|
#define _APS_NEXT_RESOURCE_VALUE 163
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40014
|
#define _APS_NEXT_COMMAND_VALUE 40016
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1003
|
#define _APS_NEXT_CONTROL_VALUE 1003
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -132,6 +132,7 @@ BEGIN
|
||||||
IDS_STARTMENU "Startmenu"
|
IDS_STARTMENU "Startmenu"
|
||||||
IDS_MINIMIZE_ALL "mimimize all windows"
|
IDS_MINIMIZE_ALL "mimimize all windows"
|
||||||
IDS_DESKTOP_NUM "Desktop %d"
|
IDS_DESKTOP_NUM "Desktop %d"
|
||||||
|
IDS_VOLUME "Volume"
|
||||||
END
|
END
|
||||||
|
|
||||||
#endif // Romanian resources
|
#endif // Romanian resources
|
||||||
|
@ -443,6 +444,7 @@ IDI_SEARCH_DOC ICON DISCARDABLE "res/search-doc.ico"
|
||||||
IDI_PRINTER ICON DISCARDABLE "res/printer.ico"
|
IDI_PRINTER ICON DISCARDABLE "res/printer.ico"
|
||||||
IDI_NETWORK ICON DISCARDABLE "res/network.ico"
|
IDI_NETWORK ICON DISCARDABLE "res/network.ico"
|
||||||
IDI_COMPUTER ICON DISCARDABLE "res/computer.ico"
|
IDI_COMPUTER ICON DISCARDABLE "res/computer.ico"
|
||||||
|
IDI_SPEAKER ICON DISCARDABLE "res/speaker.ico"
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
|
@ -513,6 +515,7 @@ BEGIN
|
||||||
IDS_STARTMENU "Startmenu"
|
IDS_STARTMENU "Startmenu"
|
||||||
IDS_MINIMIZE_ALL "alle Fenster minimieren"
|
IDS_MINIMIZE_ALL "alle Fenster minimieren"
|
||||||
IDS_DESKTOP_NUM "Desktop %d"
|
IDS_DESKTOP_NUM "Desktop %d"
|
||||||
|
IDS_VOLUME "Lautstärke"
|
||||||
END
|
END
|
||||||
|
|
||||||
#endif // German (Germany) resources
|
#endif // German (Germany) resources
|
||||||
|
@ -685,6 +688,15 @@ BEGIN
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
|
IDM_VOLUME MENU DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
POPUP ""
|
||||||
|
BEGIN
|
||||||
|
MENUITEM "Open Volume Control", ID_TRAY_VOLUME
|
||||||
|
MENUITEM "Adjust Audio Properties", ID_VOLUME_PROPERTIES
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
|
@ -862,6 +874,7 @@ BEGIN
|
||||||
IDS_STARTMENU "Startmenu"
|
IDS_STARTMENU "Startmenu"
|
||||||
IDS_MINIMIZE_ALL "mimimize all windows"
|
IDS_MINIMIZE_ALL "mimimize all windows"
|
||||||
IDS_DESKTOP_NUM "Desktop %d"
|
IDS_DESKTOP_NUM "Desktop %d"
|
||||||
|
IDS_VOLUME "Volume"
|
||||||
END
|
END
|
||||||
|
|
||||||
#endif // English (U.S.) resources
|
#endif // English (U.S.) resources
|
||||||
|
@ -988,6 +1001,7 @@ BEGIN
|
||||||
IDS_STARTMENU "Startmenu"
|
IDS_STARTMENU "Startmenu"
|
||||||
IDS_MINIMIZE_ALL "mimimize all windows"
|
IDS_MINIMIZE_ALL "mimimize all windows"
|
||||||
IDS_DESKTOP_NUM "Bureau %d"
|
IDS_DESKTOP_NUM "Bureau %d"
|
||||||
|
IDS_VOLUME "Volume"
|
||||||
END
|
END
|
||||||
|
|
||||||
#endif // French (France) resources
|
#endif // French (France) resources
|
||||||
|
@ -1190,6 +1204,7 @@ BEGIN
|
||||||
IDS_STARTMENU "Startmenu"
|
IDS_STARTMENU "Startmenu"
|
||||||
IDS_MINIMIZE_ALL "mimimize all windows"
|
IDS_MINIMIZE_ALL "mimimize all windows"
|
||||||
IDS_DESKTOP_NUM "Desktop %d"
|
IDS_DESKTOP_NUM "Desktop %d"
|
||||||
|
IDS_VOLUME "Volume"
|
||||||
END
|
END
|
||||||
|
|
||||||
#endif // Portuguese (Portugal) resources
|
#endif // Portuguese (Portugal) resources
|
||||||
|
|
BIN
reactos/subsys/system/explorer/res/speaker.ico
Normal file
BIN
reactos/subsys/system/explorer/res/speaker.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.8 KiB |
|
@ -44,8 +44,7 @@
|
||||||
|
|
||||||
DesktopBar::DesktopBar(HWND hwnd)
|
DesktopBar::DesktopBar(HWND hwnd)
|
||||||
: super(hwnd),
|
: super(hwnd),
|
||||||
// initialize Common Controls library
|
_trayIcon(hwnd, ID_TRAY_VOLUME)
|
||||||
WM_TASKBARCREATED(RegisterWindowMessage(WINMSG_TASKBARCREATED))
|
|
||||||
{
|
{
|
||||||
SystemParametersInfo(SPI_GETWORKAREA, 0, &_work_area_org, 0);
|
SystemParametersInfo(SPI_GETWORKAREA, 0, &_work_area_org, 0);
|
||||||
}
|
}
|
||||||
|
@ -239,6 +238,13 @@ LRESULT DesktopBar::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
|
||||||
return SendMessage(_hwndTaskBar, nmsg, wparam, lparam);
|
return SendMessage(_hwndTaskBar, nmsg, wparam, lparam);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case WM_TIMER:
|
||||||
|
if (wparam == ID_TRAY_VOLUME) {
|
||||||
|
KillTimer(_hwnd, wparam);
|
||||||
|
WinExec("sndvol32.exe -t", SW_SHOWNORMAL); // launch volume control in small mode
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default: def:
|
default: def:
|
||||||
return super::WndProc(nmsg, wparam, lparam);
|
return super::WndProc(nmsg, wparam, lparam);
|
||||||
}
|
}
|
||||||
|
@ -312,10 +318,14 @@ int DesktopBar::Command(int id, int code)
|
||||||
|
|
||||||
g_Globals._desktops.SwitchToDesktop(desktop_idx);
|
g_Globals._desktops.SwitchToDesktop(desktop_idx);
|
||||||
|
|
||||||
if (_hwndQuickLaunch)
|
if (_hwndQuickLaunch)
|
||||||
PostMessage(_hwndQuickLaunch, PM_UPDATE_DESKTOP, desktop_idx, 0);
|
PostMessage(_hwndQuickLaunch, PM_UPDATE_DESKTOP, desktop_idx, 0);
|
||||||
break;}
|
break;}
|
||||||
|
|
||||||
|
case ID_TRAY_VOLUME:
|
||||||
|
WinExec("sndvol32.exe", SW_SHOWNORMAL);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (_hwndQuickLaunch)
|
if (_hwndQuickLaunch)
|
||||||
return SendMessage(_hwndQuickLaunch, WM_COMMAND, MAKEWPARAM(id,code), 0);
|
return SendMessage(_hwndQuickLaunch, WM_COMMAND, MAKEWPARAM(id,code), 0);
|
||||||
|
@ -357,3 +367,34 @@ LRESULT DesktopBar::ProcessCopyData(COPYDATASTRUCT* pcd)
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void DesktopBar::AddTrayIcons()
|
||||||
|
{
|
||||||
|
_trayIcon.Add(SmallIcon(IDI_SPEAKER), ResString(IDS_VOLUME));
|
||||||
|
}
|
||||||
|
|
||||||
|
void DesktopBar::TrayClick(UINT id, int btn)
|
||||||
|
{
|
||||||
|
switch(id) {
|
||||||
|
case ID_TRAY_VOLUME:
|
||||||
|
if (btn == TRAYBUTTON_LEFT)
|
||||||
|
SetTimer(_hwnd, ID_TRAY_VOLUME, 500, NULL); // wait a bit to correctly handle double clicks
|
||||||
|
else {
|
||||||
|
PopupMenu menu(IDM_VOLUME);
|
||||||
|
SetMenuDefaultItem(menu, 0, MF_BYPOSITION);
|
||||||
|
menu.TrackPopupMenuAtPos(_hwnd, GetMessagePos());
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void DesktopBar::TrayDblClick(UINT id, int btn)
|
||||||
|
{
|
||||||
|
switch(id) {
|
||||||
|
case ID_TRAY_VOLUME:
|
||||||
|
KillTimer(_hwnd, ID_TRAY_VOLUME); // finish one-click timer
|
||||||
|
WinExec("sndvol32.exe", SW_SHOWNORMAL);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -30,9 +30,6 @@
|
||||||
#define TITLE_EXPLORERBAR TEXT("") // use an empty window title, so windows taskmanager does not show the window in its application list
|
#define TITLE_EXPLORERBAR TEXT("") // use an empty window title, so windows taskmanager does not show the window in its application list
|
||||||
|
|
||||||
|
|
||||||
#define WINMSG_TASKBARCREATED TEXT("TaskbarCreated")
|
|
||||||
|
|
||||||
|
|
||||||
#define DESKTOPBARBAR_HEIGHT 29
|
#define DESKTOPBARBAR_HEIGHT 29
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,9 +61,11 @@
|
||||||
|
|
||||||
|
|
||||||
/// desktop bar window, also known as "system tray"
|
/// desktop bar window, also known as "system tray"
|
||||||
struct DesktopBar : public OwnerDrawParent<Window>
|
struct DesktopBar : public TrayIconControllerTemplate<
|
||||||
|
OwnerDrawParent<Window> >
|
||||||
{
|
{
|
||||||
typedef OwnerDrawParent<Window> super;
|
typedef TrayIconControllerTemplate<
|
||||||
|
OwnerDrawParent<Window> > super;
|
||||||
|
|
||||||
DesktopBar(HWND hwnd);
|
DesktopBar(HWND hwnd);
|
||||||
~DesktopBar();
|
~DesktopBar();
|
||||||
|
@ -76,7 +75,6 @@ struct DesktopBar : public OwnerDrawParent<Window>
|
||||||
protected:
|
protected:
|
||||||
CommonControlInit _usingCmnCtrl;
|
CommonControlInit _usingCmnCtrl;
|
||||||
|
|
||||||
int WM_TASKBARCREATED;
|
|
||||||
RECT _work_area_org;
|
RECT _work_area_org;
|
||||||
int _taskbar_pos;
|
int _taskbar_pos;
|
||||||
|
|
||||||
|
@ -96,4 +94,10 @@ protected:
|
||||||
WindowHandle _hwndrebar;
|
WindowHandle _hwndrebar;
|
||||||
|
|
||||||
struct StartMenuRoot* _startMenuRoot;
|
struct StartMenuRoot* _startMenuRoot;
|
||||||
|
|
||||||
|
TrayIcon _trayIcon;
|
||||||
|
|
||||||
|
void AddTrayIcons();
|
||||||
|
virtual void TrayClick(UINT id, int btn);
|
||||||
|
virtual void TrayDblClick(UINT id, int btn);
|
||||||
};
|
};
|
||||||
|
|
|
@ -253,7 +253,7 @@ int QuickLaunchBar::Command(int id, int code)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 0; // Don't return 1 to avoid recursion with DesktopBar::Command()
|
||||||
}
|
}
|
||||||
|
|
||||||
int QuickLaunchBar::Notify(int id, NMHDR* pnmh)
|
int QuickLaunchBar::Notify(int id, NMHDR* pnmh)
|
||||||
|
|
|
@ -471,6 +471,12 @@ bool NotifyArea::DetermineHideState(NotifyInfo& entry)
|
||||||
*/
|
*/
|
||||||
TCHAR title[MAX_PATH];
|
TCHAR title[MAX_PATH];
|
||||||
|
|
||||||
|
if (entry._tipText == TEXT("FRITZ!fon"))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (entry._tipText == TEXT("FRITZ!fax"))
|
||||||
|
return true;
|
||||||
|
|
||||||
if (GetWindowText(entry._hWnd, title, MAX_PATH)) {
|
if (GetWindowText(entry._hWnd, title, MAX_PATH)) {
|
||||||
if (_tcsstr(title, TEXT("Task Manager")))
|
if (_tcsstr(title, TEXT("Task Manager")))
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -953,3 +953,121 @@ protected:
|
||||||
|
|
||||||
static int CALLBACK CompareFunc(LPARAM lparam1, LPARAM lparam2, LPARAM lparamSort);
|
static int CALLBACK CompareFunc(LPARAM lparam1, LPARAM lparam2, LPARAM lparamSort);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
enum {TRAYBUTTON_LEFT=0, TRAYBUTTON_RIGHT, TRAYBUTTON_MIDDLE};
|
||||||
|
|
||||||
|
#define PM_TRAYICON (WM_APP+0x1E)
|
||||||
|
|
||||||
|
#define WINMSG_TASKBARCREATED TEXT("TaskbarCreated")
|
||||||
|
|
||||||
|
|
||||||
|
struct TrayIcon
|
||||||
|
{
|
||||||
|
TrayIcon(HWND hparent, UINT id)
|
||||||
|
: _hparent(hparent), _id(id) {}
|
||||||
|
|
||||||
|
~TrayIcon()
|
||||||
|
{Remove();}
|
||||||
|
|
||||||
|
void Add(HICON hIcon, LPCTSTR tooltip=NULL)
|
||||||
|
{Set(NIM_ADD, _id, hIcon, tooltip);}
|
||||||
|
|
||||||
|
void Modify(HICON hIcon, LPCTSTR tooltip=NULL)
|
||||||
|
{Set(NIM_MODIFY, _id, hIcon, tooltip);}
|
||||||
|
|
||||||
|
void Remove()
|
||||||
|
{
|
||||||
|
NOTIFYICONDATA nid = {
|
||||||
|
sizeof(NOTIFYICONDATA), // cbSize
|
||||||
|
_hparent, // hWnd
|
||||||
|
_id, // uID
|
||||||
|
};
|
||||||
|
|
||||||
|
Shell_NotifyIcon(NIM_DELETE, &nid);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
HWND _hparent;
|
||||||
|
UINT _id;
|
||||||
|
|
||||||
|
void Set(DWORD dwMessage, UINT id, HICON hIcon, LPCTSTR tooltip=NULL)
|
||||||
|
{
|
||||||
|
NOTIFYICONDATA nid = {
|
||||||
|
sizeof(NOTIFYICONDATA), // cbSize
|
||||||
|
_hparent, // hWnd
|
||||||
|
id, // uID
|
||||||
|
NIF_MESSAGE|NIF_ICON, // uFlags
|
||||||
|
PM_TRAYICON, // uCallbackMessage
|
||||||
|
hIcon // hIcon
|
||||||
|
};
|
||||||
|
|
||||||
|
if (tooltip)
|
||||||
|
_tcsncpy(nid.szTip, tooltip, COUNTOF(nid.szTip));
|
||||||
|
|
||||||
|
if (nid.szTip[0])
|
||||||
|
nid.uFlags |= NIF_TIP;
|
||||||
|
|
||||||
|
Shell_NotifyIcon(dwMessage, &nid);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
template<typename BASE> struct TrayIconControllerTemplate : public BASE
|
||||||
|
{
|
||||||
|
typedef BASE super;
|
||||||
|
|
||||||
|
TrayIconControllerTemplate(HWND hwnd) : BASE(hwnd),
|
||||||
|
WM_TASKBARCREATED(RegisterWindowMessage(WINMSG_TASKBARCREATED))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
LRESULT WndProc(UINT message, WPARAM wparam, LPARAM lparam)
|
||||||
|
{
|
||||||
|
if (message == PM_TRAYICON) {
|
||||||
|
switch(lparam) {
|
||||||
|
case WM_MOUSEMOVE:
|
||||||
|
TrayMouseOver(wparam);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WM_LBUTTONDOWN:
|
||||||
|
TrayClick(wparam, TRAYBUTTON_LEFT);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WM_LBUTTONDBLCLK:
|
||||||
|
TrayDblClick(wparam, TRAYBUTTON_LEFT);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WM_RBUTTONDOWN:
|
||||||
|
TrayClick(wparam, TRAYBUTTON_RIGHT);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WM_RBUTTONDBLCLK:
|
||||||
|
TrayDblClick(wparam, TRAYBUTTON_RIGHT);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WM_MBUTTONDOWN:
|
||||||
|
TrayClick(wparam, TRAYBUTTON_MIDDLE);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WM_MBUTTONDBLCLK:
|
||||||
|
TrayDblClick(wparam, TRAYBUTTON_MIDDLE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
} else if (message == WM_TASKBARCREATED) {
|
||||||
|
AddTrayIcons();
|
||||||
|
return 0;
|
||||||
|
} else
|
||||||
|
return super::WndProc(message, wparam, lparam);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void AddTrayIcons() = 0;
|
||||||
|
virtual void TrayMouseOver(UINT id) {}
|
||||||
|
virtual void TrayClick(UINT id, int btn) {}
|
||||||
|
virtual void TrayDblClick(UINT id, int btn) {}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
const UINT WM_TASKBARCREATED;
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in a new issue