SDC C-Project CF Review 프로그램
LYW
2021-08-17 9aa3a8ff940e89bb0b5c75bc8abd0864e4c85874
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
/////////////////////////////////////////////////////////////////////////////
// TrayIcon.h : header file
//
 
#ifndef _INCLUDED_TRAYICON_H_
#define _INCLUDED_TRAYICON_H_
 
/////////////////////////////////////////////////////////////////////////////
// CTrayIcon window
 
#define    WM_ICON_NOTIFY                WM_USER+1003       // »ç¿ëÀÚ Á¤ÀÇ ¸Þ¼¼Áö
 
class CTrayIcon : public CObject
{
// Construction/destruction
public:
    CTrayIcon();
    CTrayIcon(CWnd* pWnd, UINT uCallbackMessage, LPCTSTR szTip, HICON icon, UINT uID);
    virtual ~CTrayIcon();
 
// Operations
public:
    BOOL Enabled() { return m_bEnabled; }
    BOOL Visible() { return !m_bHidden; }
 
    //Create the tray icon
    BOOL Create(CWnd* pWnd, UINT uCallbackMessage, LPCTSTR szTip, HICON icon, UINT uID);
 
    //Change or retrieve the Tooltip text
    BOOL    SetTooltipText(LPCTSTR pszTooltipText);
    BOOL    SetTooltipText(UINT nID);
    CString GetTooltipText() const;
 
    //Change or retrieve the icon displayed
    BOOL  SetIcon(HICON hIcon);
    BOOL  SetIcon(LPCTSTR lpIconName);
    BOOL  SetIcon(UINT nIDResource);
    BOOL  SetStandardIcon(LPCTSTR lpIconName);
    BOOL  SetStandardIcon(UINT nIDResource);
    HICON GetIcon() const;
    void  HideIcon();
    void  ShowIcon();
    void  RemoveIcon();
    void  MoveToRight();
 
    //Change or retrieve the window to send notification messages to
    BOOL  SetNotificationWnd(CWnd* pNotifyWnd);
    CWnd* GetNotificationWnd() const;
 
    //Default handler for tray notification message
    virtual LRESULT OnTrayNotification(WPARAM uID, LPARAM lEvent);
 
// Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CTrayIcon)
    //}}AFX_VIRTUAL
 
// Implementation
protected:
    BOOL            m_bEnabled;    // does O/S support tray icon?
    BOOL            m_bHidden;    // Has the icon been hidden?
    NOTIFYICONDATA    m_tnd;
 
    DECLARE_DYNAMIC(CTrayIcon)
};
 
 
#endif
 
/////////////////////////////////////////////////////////////////////////////