Skip to content

Commit

Permalink
1. turn on debug on TSFTTS
Browse files Browse the repository at this point in the history
2. Left click to hide notify window as well.
  • Loading branch information
jrywu committed Dec 2, 2013
1 parent 9a46404 commit 2e0f022
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
12 changes: 12 additions & 0 deletions NotifyWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion NotifyWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions TSFTTS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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);
Expand Down

0 comments on commit 2e0f022

Please sign in to comment.