-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTrayDialog.h
More file actions
71 lines (55 loc) · 2.03 KB
/
TrayDialog.h
File metadata and controls
71 lines (55 loc) · 2.03 KB
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
65
66
67
68
69
70
71
#if !defined(AFX_TRAYDIALOG_H__24C2AEA9_B40D_11D4_BFA7_00C0DF034AED__INCLUDED_)
#define AFX_TRAYDIALOG_H__24C2AEA9_B40D_11D4_BFA7_00C0DF034AED__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// TrayDialog.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CTrayDialog dialog
#define WM_TRAY_ICON_NOTIFY_MESSAGE (WM_USER + 1)
class CTrayDialog : public CDialog
{
private:
BOOL m_bMinimizeToTray;
BOOL m_bTrayIconVisible;
NOTIFYICONDATA m_nidIconData;
UINT m_nDefaultMenuItem;
// Construction
public:
CMenu m_mnuTrayMenu;
void TraySetMinimizeToTray(BOOL bMinimizeToTray = TRUE);
BOOL TraySetMenu(UINT nResourceID,UINT nDefaultPos=0);
BOOL TraySetMenu(HMENU hMenu,UINT nDefaultPos=0);
BOOL TraySetMenu(LPCTSTR lpszMenuName,UINT nDefaultPos=0);
BOOL TrayUpdate();
BOOL TrayShow();
LRESULT TrayRedraw(WPARAM wParam, LPARAM lParam);
BOOL TrayHide();
void TraySetToolTip(LPCTSTR lpszToolTip);
void TrayShowBalloonToolTip(int Type, const wchar_t* Title, const wchar_t* Info, int TimeMS);
void TraySetIcon(HICON hIcon);
void TraySetIcon(UINT nResourceID);
void TraySetIcon(LPCTSTR lpszResourceName);
BOOL TrayIsVisible();
CTrayDialog(UINT uIDD,CWnd* pParent = NULL); // standard constructor
virtual void OnTrayLButtonDown(CPoint pt);
virtual void OnTrayLButtonDblClk(CPoint pt);
virtual void OnTrayRButtonDown(CPoint pt);
virtual void OnTrayRButtonDblClk(CPoint pt);
virtual void OnTrayMouseMove(CPoint pt);
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CTrayDialog)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnDestroy();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg LRESULT OnTrayNotify(WPARAM wParam, LPARAM lParam);
//}}AFX_MSG
protected:
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TRAYDIALOG_H__24C2AEA9_B40D_11D4_BFA7_00C0DF034AED__INCLUDED_)