Respond to WM_CLOSE in the hidden window so that the installer can
kill us off nice and easily.
This commit is contained in:
parent
7cfbedc04c
commit
dcd5980fa6
|
@ -71,6 +71,14 @@ void CNotifyIcon::Destroy()
|
||||||
base::DestroyWindow();
|
base::DestroyWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CNotifyIcon::OnClose()
|
||||||
|
{
|
||||||
|
// The only time this should happen is if something else explicitly
|
||||||
|
// sends us the message (such as the installer). We'll just
|
||||||
|
// exit completely.
|
||||||
|
GetApplication()->Exit();
|
||||||
|
}
|
||||||
|
|
||||||
void CNotifyIcon::PopupBalloon(UINT title_id, UINT text_id, DWORD flags)
|
void CNotifyIcon::PopupBalloon(UINT title_id, UINT text_id, DWORD flags)
|
||||||
{
|
{
|
||||||
CString title, text;
|
CString title, text;
|
||||||
|
|
|
@ -45,6 +45,7 @@ class CNotifyIcon
|
||||||
MESSAGE_HANDLER(WM_SERVEREVENT, OnServerEvent)
|
MESSAGE_HANDLER(WM_SERVEREVENT, OnServerEvent)
|
||||||
MESSAGE_HANDLER(WM_WTSSESSION_CHANGE, OnSessionChange)
|
MESSAGE_HANDLER(WM_WTSSESSION_CHANGE, OnSessionChange)
|
||||||
MSG_WM_TIMER(OnTimer)
|
MSG_WM_TIMER(OnTimer)
|
||||||
|
MSG_WM_CLOSE(OnClose)
|
||||||
END_MSG_MAP()
|
END_MSG_MAP()
|
||||||
|
|
||||||
// Message handlers
|
// Message handlers
|
||||||
|
@ -56,6 +57,7 @@ class CNotifyIcon
|
||||||
LRESULT OnServerEvent(UINT, WPARAM, LPARAM, BOOL &bHandled);
|
LRESULT OnServerEvent(UINT, WPARAM, LPARAM, BOOL &bHandled);
|
||||||
LRESULT OnSessionChange(UINT, WPARAM, LPARAM, BOOL &bHandled);
|
LRESULT OnSessionChange(UINT, WPARAM, LPARAM, BOOL &bHandled);
|
||||||
void OnTimer(UINT id, TIMERPROC proc);
|
void OnTimer(UINT id, TIMERPROC proc);
|
||||||
|
void OnClose();
|
||||||
|
|
||||||
void PopupBalloon(UINT title_id, UINT text_id, DWORD flags = NIIF_INFO);
|
void PopupBalloon(UINT title_id, UINT text_id, DWORD flags = NIIF_INFO);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue