From 2e0f0222ef9b9813a9d3483a6b9506e1f06bb549 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Mon, 2 Dec 2013 23:06:29 +0800 Subject: [PATCH] 1. turn on debug on TSFTTS 2. Left click to hide notify window as well. --- NotifyWindow.cpp | 12 ++++++++++++ NotifyWindow.h | 2 +- TSFTTS.cpp | 4 ++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/NotifyWindow.cpp b/NotifyWindow.cpp index bffcc63..dd4a72d 100644 --- a/NotifyWindow.cpp +++ b/NotifyWindow.cpp @@ -440,6 +440,9 @@ void CNotifyWindow::_HandleMouseMsg(_In_ UINT mouseMsg, _In_ POINT point) case WM_LBUTTONDOWN: _OnLButtonDown(point); break; + case WM_RBUTTONDOWN: + _OnRButtonDown(point); + break; case WM_LBUTTONUP: _OnLButtonUp(point); break; @@ -682,6 +685,15 @@ void CNotifyWindow::_OnLButtonDown(POINT pt) } +void CNotifyWindow::_OnRButtonDown(POINT pt) +{ + pt; + //hide the notify if click outside the notify window. + _Show(FALSE,0,0); + + +} + void CNotifyWindow::_OnMouseMove(POINT pt) { diff --git a/NotifyWindow.h b/NotifyWindow.h index 45612fa..4a8c7ab 100644 --- a/NotifyWindow.h +++ b/NotifyWindow.h @@ -42,7 +42,7 @@ class CNotifyWindow : public CBaseWindow virtual void _OnTimerID(UINT_PTR timerID); void _OnLButtonDown(POINT pt); - //void _OnLButtonUp(POINT pt); + void _OnRButtonDown(POINT pt); void _OnMouseMove(POINT pt); void _AddString(_Inout_ const CStringRange *pNotifyText); diff --git a/TSFTTS.cpp b/TSFTTS.cpp index c888498..70e1ef3 100644 --- a/TSFTTS.cpp +++ b/TSFTTS.cpp @@ -340,7 +340,7 @@ STDAPI CTSFTTS::QueryInterface(REFIID riid, _Outptr_ void **ppvObj) STDAPI_(ULONG) CTSFTTS::AddRef() { - //debugPrint(L"CTSFTTS::AddRef(), _refCount = %d", _refCount+1); + debugPrint(L"CTSFTTS::AddRef(), _refCount = %d", _refCount+1); return ++_refCount; } @@ -352,7 +352,7 @@ STDAPI_(ULONG) CTSFTTS::AddRef() STDAPI_(ULONG) CTSFTTS::Release() { - //debugPrint(L"CTSFTTS::Release(), _refCount = %d", _refCount-1); + debugPrint(L"CTSFTTS::Release(), _refCount = %d", _refCount-1); LONG cr = --_refCount; assert(_refCount >= 0);