2004-11-02 04:44:24 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
// File: taskbar.cpp
|
|
|
|
// Purpose: Implements wxTaskBarIconEx class for manipulating icons on
|
|
|
|
// the Windows task bar.
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 24/3/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c)
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation "taskbarex.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "stdwx.h"
|
2005-04-27 18:04:42 +00:00
|
|
|
#include "BOINCGUIApp.h"
|
2004-11-02 04:44:24 +00:00
|
|
|
#include "msw/taskbarex.h"
|
|
|
|
|
|
|
|
|
2005-04-27 18:04:42 +00:00
|
|
|
LRESULT APIENTRY wxTaskBarIconExWindowProc( HWND hWnd, unsigned msg, UINT wParam, LONG lParam );
|
2005-04-26 04:20:35 +00:00
|
|
|
|
|
|
|
wxChar* wxTaskBarExWindowClass = (wxChar*) wxT("wxTaskBarExWindowClass");
|
|
|
|
wxChar* wxTaskBarExWindow = (wxChar*) wxT("wxTaskBarExWindow");
|
2005-02-09 01:14:14 +00:00
|
|
|
|
2004-11-23 07:45:11 +00:00
|
|
|
const UINT WM_TASKBARCREATED = ::RegisterWindowMessage(wxT("TaskbarCreated"));
|
2005-02-09 01:14:14 +00:00
|
|
|
const UINT WM_TASKBARSHUTDOWN = ::RegisterWindowMessage(wxT("TaskbarShutdown"));
|
2004-11-02 04:44:24 +00:00
|
|
|
|
|
|
|
bool wxTaskBarIconEx::sm_registeredClass = FALSE;
|
|
|
|
UINT wxTaskBarIconEx::sm_taskbarMsg = 0;
|
|
|
|
|
2004-11-02 19:47:23 +00:00
|
|
|
DEFINE_EVENT_TYPE( wxEVT_TASKBAR_CREATED )
|
2004-11-02 04:44:24 +00:00
|
|
|
DEFINE_EVENT_TYPE( wxEVT_TASKBAR_CONTEXT_MENU )
|
2004-11-02 19:47:23 +00:00
|
|
|
DEFINE_EVENT_TYPE( wxEVT_TASKBAR_SELECT )
|
|
|
|
DEFINE_EVENT_TYPE( wxEVT_TASKBAR_KEY_SELECT )
|
|
|
|
DEFINE_EVENT_TYPE( wxEVT_TASKBAR_BALLOON_SHOW )
|
|
|
|
DEFINE_EVENT_TYPE( wxEVT_TASKBAR_BALLOON_HIDE )
|
|
|
|
DEFINE_EVENT_TYPE( wxEVT_TASKBAR_BALLOON_TIMEOUT )
|
|
|
|
DEFINE_EVENT_TYPE( wxEVT_TASKBAR_BALLOON_USERCLICK )
|
2005-02-09 01:14:14 +00:00
|
|
|
DEFINE_EVENT_TYPE( wxEVT_TASKBAR_SHUTDOWN )
|
2004-11-02 04:44:24 +00:00
|
|
|
|
|
|
|
IMPLEMENT_DYNAMIC_CLASS(wxTaskBarIconEx, wxEvtHandler)
|
|
|
|
|
2004-11-04 05:34:51 +00:00
|
|
|
BEGIN_EVENT_TABLE (wxTaskBarIconEx, wxEvtHandler)
|
2004-11-05 21:23:40 +00:00
|
|
|
EVT_CLOSE(wxTaskBarIconEx::OnClose)
|
2004-11-04 05:34:51 +00:00
|
|
|
EVT_TASKBAR_CREATED(wxTaskBarIconEx::OnTaskBarCreated)
|
|
|
|
END_EVENT_TABLE ()
|
|
|
|
|
2004-11-02 04:44:24 +00:00
|
|
|
|
|
|
|
wxTaskBarIconEx::wxTaskBarIconEx(void)
|
|
|
|
{
|
|
|
|
m_hWnd = 0;
|
|
|
|
m_iconAdded = FALSE;
|
|
|
|
|
|
|
|
if (RegisterWindowClass())
|
2005-02-09 01:14:14 +00:00
|
|
|
m_hWnd = CreateTaskBarWindow( wxTaskBarExWindow );
|
|
|
|
}
|
|
|
|
|
|
|
|
wxTaskBarIconEx::wxTaskBarIconEx( wxChar* szWindowTitle )
|
|
|
|
{
|
|
|
|
m_hWnd = 0;
|
|
|
|
m_iconAdded = FALSE;
|
|
|
|
|
|
|
|
if (RegisterWindowClass())
|
|
|
|
m_hWnd = CreateTaskBarWindow( szWindowTitle );
|
2004-11-02 04:44:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
wxTaskBarIconEx::~wxTaskBarIconEx(void)
|
|
|
|
{
|
|
|
|
if (m_iconAdded)
|
|
|
|
{
|
|
|
|
RemoveIcon();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (m_hWnd)
|
|
|
|
{
|
|
|
|
::DestroyWindow((HWND) m_hWnd);
|
|
|
|
m_hWnd = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-11-04 05:34:51 +00:00
|
|
|
// Events
|
2004-11-05 21:23:40 +00:00
|
|
|
void wxTaskBarIconEx::OnClose(wxCloseEvent& event)
|
|
|
|
{
|
2005-02-09 01:14:14 +00:00
|
|
|
wxLogTrace(wxT("Function Start/End"), wxT("wxTaskBarIconEx::OnClose - Function Begin"));
|
|
|
|
|
2004-11-05 21:23:40 +00:00
|
|
|
::DestroyWindow((HWND) m_hWnd);
|
|
|
|
m_hWnd = 0;
|
2005-02-09 01:14:14 +00:00
|
|
|
|
|
|
|
wxLogTrace(wxT("Function Start/End"), wxT("wxTaskBarIconEx::OnClose - Function End"));
|
2004-11-05 21:23:40 +00:00
|
|
|
}
|
|
|
|
|
2004-11-04 05:34:51 +00:00
|
|
|
void wxTaskBarIconEx::OnTaskBarCreated(wxTaskBarIconExEvent& event)
|
|
|
|
{
|
|
|
|
if (m_iconAdded)
|
|
|
|
Shell_NotifyIcon(NIM_MODIFY, ¬ifyData);
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_iconAdded = (Shell_NotifyIcon(NIM_ADD, ¬ifyData) != 0);
|
|
|
|
Shell_NotifyIcon(NIM_SETVERSION, ¬ifyData);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-11-02 04:44:24 +00:00
|
|
|
// Operations
|
|
|
|
bool wxTaskBarIconEx::SetIcon(const wxIcon& icon, const wxString& tooltip)
|
|
|
|
{
|
|
|
|
if (!IsOK())
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
memset(¬ifyData, 0, sizeof(notifyData));
|
2004-11-03 21:06:12 +00:00
|
|
|
notifyData.cbSize = sizeof(notifyData);
|
|
|
|
notifyData.hWnd = (HWND) m_hWnd;
|
|
|
|
notifyData.uID = 99;
|
2004-11-02 10:14:41 +00:00
|
|
|
notifyData.uCallbackMessage = sm_taskbarMsg;
|
2004-11-03 21:06:12 +00:00
|
|
|
notifyData.uFlags = NIF_MESSAGE;
|
|
|
|
notifyData.uVersion = NOTIFYICON_VERSION;
|
2004-11-02 10:14:41 +00:00
|
|
|
|
2004-11-02 04:44:24 +00:00
|
|
|
if (icon.Ok())
|
|
|
|
{
|
|
|
|
notifyData.uFlags |= NIF_ICON;
|
|
|
|
notifyData.hIcon = (HICON) icon.GetHICON();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (((const wxChar*) tooltip != NULL) && (tooltip != wxT("")))
|
|
|
|
{
|
|
|
|
notifyData.uFlags |= NIF_TIP ;
|
2004-11-23 07:45:11 +00:00
|
|
|
lstrcpyn(notifyData.szTip, WXSTRINGCAST tooltip, sizeof(notifyData.szTip));
|
2004-11-02 04:44:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (m_iconAdded)
|
2004-11-03 21:06:12 +00:00
|
|
|
return (Shell_NotifyIcon(NIM_MODIFY, ¬ifyData) != 0);
|
2004-11-02 04:44:24 +00:00
|
|
|
else
|
|
|
|
{
|
2004-11-03 21:06:12 +00:00
|
|
|
m_iconAdded = (Shell_NotifyIcon(NIM_ADD, ¬ifyData) != 0);
|
2004-11-23 07:45:11 +00:00
|
|
|
if (IsBalloonsSupported())
|
|
|
|
Shell_NotifyIcon(NIM_SETVERSION, ¬ifyData);
|
2004-11-02 04:44:24 +00:00
|
|
|
return m_iconAdded;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-11-02 10:14:41 +00:00
|
|
|
bool wxTaskBarIconEx::SetBalloon(const wxIcon& icon, const wxString title, const wxString message, unsigned int timeout, ICONTYPES iconballoon)
|
|
|
|
{
|
2004-11-23 07:45:11 +00:00
|
|
|
if (!IsOK())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
wxString strTip = wxEmptyString;
|
|
|
|
|
|
|
|
if (!IsBalloonsSupported())
|
|
|
|
strTip = title + wxT(" - ") + message;
|
2004-11-02 10:14:41 +00:00
|
|
|
|
|
|
|
memset(¬ifyData, 0, sizeof(notifyData));
|
|
|
|
notifyData.cbSize = sizeof(notifyData);
|
|
|
|
notifyData.hWnd = (HWND) m_hWnd;
|
|
|
|
notifyData.uID = 99;
|
|
|
|
notifyData.uCallbackMessage = sm_taskbarMsg;
|
2005-01-06 22:06:35 +00:00
|
|
|
notifyData.uFlags = NIF_MESSAGE;
|
2004-11-02 10:14:41 +00:00
|
|
|
notifyData.dwInfoFlags = iconballoon | NIIF_NOSOUND;
|
|
|
|
notifyData.uTimeout = timeout;
|
2004-11-03 21:06:12 +00:00
|
|
|
notifyData.uVersion = NOTIFYICON_VERSION;
|
2004-11-02 10:14:41 +00:00
|
|
|
|
|
|
|
if (icon.Ok())
|
|
|
|
{
|
|
|
|
notifyData.uFlags |= NIF_ICON;
|
|
|
|
notifyData.hIcon = (HICON) icon.GetHICON();
|
|
|
|
}
|
|
|
|
|
2005-01-06 22:06:35 +00:00
|
|
|
if (IsBalloonsSupported())
|
|
|
|
{
|
|
|
|
notifyData.uFlags |= NIF_INFO;
|
|
|
|
lstrcpyn(notifyData.szInfo, WXSTRINGCAST message, sizeof(notifyData.szInfo));
|
|
|
|
lstrcpyn(notifyData.szInfoTitle, WXSTRINGCAST title, sizeof(notifyData.szInfoTitle));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
notifyData.uFlags |= NIF_TIP;
|
|
|
|
lstrcpyn(notifyData.szTip, WXSTRINGCAST strTip, sizeof(notifyData.szTip));
|
|
|
|
}
|
|
|
|
|
2004-11-02 10:14:41 +00:00
|
|
|
if (m_iconAdded)
|
|
|
|
return (Shell_NotifyIcon(NIM_MODIFY, & notifyData) != 0);
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_iconAdded = (Shell_NotifyIcon(NIM_ADD, & notifyData) != 0);
|
2004-11-23 07:45:11 +00:00
|
|
|
if (IsBalloonsSupported())
|
|
|
|
Shell_NotifyIcon(NIM_SETVERSION, ¬ifyData);
|
2004-11-02 10:14:41 +00:00
|
|
|
return m_iconAdded;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-11-02 04:44:24 +00:00
|
|
|
bool wxTaskBarIconEx::RemoveIcon(void)
|
|
|
|
{
|
|
|
|
if (!m_iconAdded)
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
memset(¬ifyData, 0, sizeof(notifyData));
|
2004-11-03 21:06:12 +00:00
|
|
|
notifyData.cbSize = sizeof(notifyData);
|
|
|
|
notifyData.hWnd = (HWND) m_hWnd;
|
|
|
|
notifyData.uCallbackMessage = sm_taskbarMsg;
|
|
|
|
notifyData.uFlags = NIF_MESSAGE;
|
|
|
|
notifyData.hIcon = 0 ; // hIcon;
|
2004-11-02 04:44:24 +00:00
|
|
|
notifyData.uID = 99;
|
|
|
|
m_iconAdded = FALSE;
|
|
|
|
|
|
|
|
return (Shell_NotifyIcon(NIM_DELETE, & notifyData) != 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool wxTaskBarIconEx::PopupMenu(wxMenu *menu) //, int x, int y);
|
|
|
|
{
|
|
|
|
// OK, so I know this isn't thread-friendly, but
|
|
|
|
// what to do? We need this check.
|
|
|
|
|
|
|
|
static bool s_inPopup = FALSE;
|
|
|
|
|
|
|
|
if (s_inPopup)
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
s_inPopup = TRUE;
|
|
|
|
|
|
|
|
bool rval = FALSE;
|
|
|
|
wxWindow* win;
|
|
|
|
int x, y;
|
|
|
|
wxGetMousePosition(&x, &y);
|
|
|
|
|
|
|
|
// is wxFrame the best window type to use???
|
|
|
|
win = new wxFrame(NULL, -1, wxEmptyString, wxPoint(x,y), wxSize(-1,-1), 0);
|
|
|
|
win->PushEventHandler(this);
|
|
|
|
|
|
|
|
// Remove from record of top-level windows, or will confuse wxWindows
|
|
|
|
// if we try to exit right now.
|
|
|
|
wxTopLevelWindows.DeleteObject(win);
|
|
|
|
|
|
|
|
menu->UpdateUI();
|
|
|
|
|
|
|
|
// Work around a WIN32 bug
|
|
|
|
::SetForegroundWindow ((HWND) win->GetHWND ());
|
|
|
|
|
|
|
|
rval = win->PopupMenu(menu, 0, 0);
|
|
|
|
|
|
|
|
// Work around a WIN32 bug
|
|
|
|
::PostMessage ((HWND) win->GetHWND(),WM_NULL,0,0L);
|
|
|
|
|
|
|
|
win->PopEventHandler(FALSE);
|
|
|
|
win->Destroy();
|
|
|
|
delete win;
|
|
|
|
|
|
|
|
s_inPopup = FALSE;
|
|
|
|
|
|
|
|
return rval;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool wxTaskBarIconEx::RegisterWindowClass()
|
|
|
|
{
|
|
|
|
if (sm_registeredClass)
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
// Also register the taskbar message here
|
|
|
|
sm_taskbarMsg = ::RegisterWindowMessage(wxT("wxTaskBarIconExMessage"));
|
|
|
|
|
|
|
|
WNDCLASS wc;
|
|
|
|
bool rc;
|
|
|
|
|
|
|
|
HINSTANCE hInstance = GetModuleHandle(NULL);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* set up and register window class
|
|
|
|
*/
|
|
|
|
wc.style = CS_HREDRAW | CS_VREDRAW;
|
|
|
|
wc.lpfnWndProc = (WNDPROC) wxTaskBarIconExWindowProc;
|
|
|
|
wc.cbClsExtra = 0;
|
|
|
|
wc.cbWndExtra = 0;
|
|
|
|
wc.hInstance = hInstance;
|
|
|
|
wc.hIcon = 0;
|
|
|
|
wc.hCursor = 0;
|
|
|
|
wc.hbrBackground = 0;
|
|
|
|
wc.lpszMenuName = NULL;
|
|
|
|
wc.lpszClassName = wxTaskBarExWindowClass ;
|
|
|
|
rc = (::RegisterClass( &wc ) != 0);
|
|
|
|
|
|
|
|
sm_registeredClass = (rc != 0);
|
|
|
|
|
|
|
|
return( (rc != 0) );
|
|
|
|
}
|
|
|
|
|
2005-02-09 01:14:14 +00:00
|
|
|
WXHWND wxTaskBarIconEx::CreateTaskBarWindow( wxChar* szWindowTitle )
|
2004-11-02 04:44:24 +00:00
|
|
|
{
|
|
|
|
HINSTANCE hInstance = GetModuleHandle(NULL);
|
|
|
|
|
|
|
|
HWND hWnd = CreateWindowEx (0, wxTaskBarExWindowClass,
|
2005-02-09 01:14:14 +00:00
|
|
|
szWindowTitle,
|
2004-11-02 04:44:24 +00:00
|
|
|
WS_OVERLAPPED,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
10,
|
|
|
|
10,
|
|
|
|
NULL,
|
|
|
|
(HMENU) 0,
|
|
|
|
hInstance,
|
|
|
|
NULL);
|
|
|
|
|
|
|
|
return (WXHWND) hWnd;
|
|
|
|
}
|
|
|
|
|
2004-11-23 07:45:11 +00:00
|
|
|
bool wxTaskBarIconEx::IsBalloonsSupported()
|
|
|
|
{
|
|
|
|
#ifdef __WXMSW__
|
|
|
|
wxInt32 iMajor = 0, iMinor = 0;
|
|
|
|
if ( wxWINDOWS_NT == wxGetOsVersion( &iMajor, &iMinor ) )
|
|
|
|
{
|
2005-01-06 22:06:35 +00:00
|
|
|
if ( (5 >= iMajor) && (0 <= iMinor) )
|
2004-11-23 07:45:11 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2004-11-02 04:44:24 +00:00
|
|
|
long wxTaskBarIconEx::WindowProc( WXHWND hWnd, unsigned int msg, unsigned int wParam, long lParam )
|
|
|
|
{
|
2005-02-09 01:14:14 +00:00
|
|
|
wxLogTrace(wxT("Function Start/End"), wxT("wxTaskBarIconEx::WindowProc - Function Begin"));
|
|
|
|
|
2004-11-02 04:44:24 +00:00
|
|
|
wxEventType eventType = 0;
|
2005-02-09 01:14:14 +00:00
|
|
|
long lReturnValue = 0;
|
2004-11-02 04:44:24 +00:00
|
|
|
|
2005-02-09 01:14:14 +00:00
|
|
|
if ( WM_CLOSE == msg )
|
|
|
|
{
|
|
|
|
wxLogTrace(wxT("Function Status"), wxT("wxTaskBarIconEx::WindowProc - WM_CLOSE Detected"));
|
|
|
|
|
2005-04-26 04:20:35 +00:00
|
|
|
wxCloseEvent eventClose(wxEVT_CLOSE_WINDOW);
|
2005-02-09 01:14:14 +00:00
|
|
|
ProcessEvent(eventClose);
|
|
|
|
|
|
|
|
if ( !eventClose.GetSkipped() )
|
|
|
|
lReturnValue = DefWindowProc((HWND) hWnd, msg, wParam, lParam);
|
|
|
|
else
|
|
|
|
lReturnValue = 0;
|
|
|
|
}
|
|
|
|
else if ( WM_TASKBARCREATED == msg )
|
|
|
|
{
|
|
|
|
wxLogTrace(wxT("Function Status"), wxT("wxTaskBarIconEx::WindowProc - WM_TASKBARCREATED Detected"));
|
|
|
|
eventType = wxEVT_TASKBAR_CREATED;
|
|
|
|
}
|
|
|
|
else if ( WM_TASKBARSHUTDOWN == msg )
|
|
|
|
{
|
|
|
|
wxLogTrace(wxT("Function Status"), wxT("wxTaskBarIconEx::WindowProc - WM_TASKBARSHUTDOWN Detected"));
|
|
|
|
eventType = wxEVT_TASKBAR_SHUTDOWN;
|
|
|
|
}
|
2004-11-02 04:44:24 +00:00
|
|
|
if (msg != sm_taskbarMsg)
|
2005-02-09 01:14:14 +00:00
|
|
|
lReturnValue = DefWindowProc((HWND) hWnd, msg, wParam, lParam);
|
2004-11-02 04:44:24 +00:00
|
|
|
|
2005-02-09 01:14:14 +00:00
|
|
|
if ( 0 == eventType )
|
2004-11-02 04:44:24 +00:00
|
|
|
{
|
2005-02-09 01:14:14 +00:00
|
|
|
switch (lParam)
|
|
|
|
{
|
|
|
|
case WM_LBUTTONDOWN:
|
|
|
|
eventType = wxEVT_TASKBAR_LEFT_DOWN;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_LBUTTONUP:
|
|
|
|
eventType = wxEVT_TASKBAR_LEFT_UP;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_RBUTTONDOWN:
|
|
|
|
eventType = wxEVT_TASKBAR_RIGHT_DOWN;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_RBUTTONUP:
|
|
|
|
eventType = wxEVT_TASKBAR_RIGHT_UP;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_LBUTTONDBLCLK:
|
|
|
|
eventType = wxEVT_TASKBAR_LEFT_DCLICK;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_RBUTTONDBLCLK:
|
|
|
|
eventType = wxEVT_TASKBAR_RIGHT_DCLICK;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_MOUSEMOVE:
|
|
|
|
eventType = wxEVT_TASKBAR_MOVE;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_CONTEXTMENU:
|
|
|
|
eventType = wxEVT_TASKBAR_CONTEXT_MENU;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case NIN_SELECT:
|
|
|
|
eventType = wxEVT_TASKBAR_SELECT;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case NIN_KEYSELECT:
|
|
|
|
eventType = wxEVT_TASKBAR_KEY_SELECT;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case NIN_BALLOONSHOW:
|
|
|
|
eventType = wxEVT_TASKBAR_BALLOON_SHOW;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case NIN_BALLOONHIDE:
|
|
|
|
eventType = wxEVT_TASKBAR_BALLOON_HIDE;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case NIN_BALLOONTIMEOUT:
|
|
|
|
eventType = wxEVT_TASKBAR_BALLOON_TIMEOUT;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case NIN_BALLOONUSERCLICK:
|
|
|
|
eventType = wxEVT_TASKBAR_BALLOON_USERCLICK;
|
|
|
|
break;
|
|
|
|
}
|
2004-11-02 19:47:23 +00:00
|
|
|
}
|
|
|
|
|
2004-11-03 23:08:41 +00:00
|
|
|
if (eventType)
|
2004-11-02 19:47:23 +00:00
|
|
|
{
|
2004-11-02 04:44:24 +00:00
|
|
|
wxTaskBarIconExEvent event(eventType, this);
|
|
|
|
ProcessEvent(event);
|
2005-02-09 01:14:14 +00:00
|
|
|
|
|
|
|
lReturnValue = 0;
|
2004-11-02 04:44:24 +00:00
|
|
|
}
|
2004-11-03 23:08:41 +00:00
|
|
|
|
2005-02-09 01:14:14 +00:00
|
|
|
wxLogTrace(wxT("Function Start/End"), wxT("wxTaskBarIconEx::WindowProc - Function End"));
|
|
|
|
return lReturnValue;
|
2004-11-02 04:44:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
LRESULT APIENTRY wxTaskBarIconExWindowProc( HWND hWnd, unsigned msg, UINT wParam, LONG lParam )
|
|
|
|
{
|
2005-04-27 18:04:42 +00:00
|
|
|
return wxGetApp().GetTaskBarIcon()->WindowProc((WXHWND) hWnd, msg, wParam, lParam);
|
2004-11-02 04:44:24 +00:00
|
|
|
}
|
|
|
|
|
2004-12-08 00:40:19 +00:00
|
|
|
|
2005-01-02 18:29:53 +00:00
|
|
|
const char *BOINC_RCSID_46d006c50e = "$Id$";
|