-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTrayIconPicStand.cpp
64 lines (46 loc) · 1.16 KB
/
TrayIconPicStand.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// TrayIconPicStand.cpp: CTrayIconPicStand クラスのインプリメンテーション
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "picstand.h"
#include "TrayIconPicStand.h"
#include "Global.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// 構築/消滅
//////////////////////////////////////////////////////////////////////
CTrayIconPicStand::CTrayIconPicStand( HWND hWnd )
:CTrayIcon( hWnd, IDI_DEFAULTICON, APP_NAME, ITMES_TASKTRAY )
{
}
CTrayIconPicStand::~CTrayIconPicStand()
{
}
void CTrayIconPicStand::OnMessage( LPARAM lParam )
{
switch( lParam ){
case WM_LBUTTONDOWN:
SetWindowPos( &CWnd::wndTopMost, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE );
SetZOrder( m_ZOrder );
break;
case WM_LBUTTONDBLCLK:
if( m_WndStyle == WNDSTYLE_BAR ){
SetNormalStyle();
}
break;
case WM_RBUTTONDOWN:
{
// メニューが消えなくなる件の Workaround
SetForegroundWindow();
CPoint MousePoint;
::GetCursorPos( &MousePoint );
ActivateMenu( MousePoint.x, MousePoint.y );
}
break;
}
break;
}