-
Notifications
You must be signed in to change notification settings - Fork 206
/
ClipboardViewer.h
72 lines (56 loc) · 1.97 KB
/
ClipboardViewer.h
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
72
#if !defined(AFX_CLIPBOARDVIEWER_H__67418FB6_6048_48FA_86D4_F412CACC41B1__INCLUDED_)
#define AFX_CLIPBOARDVIEWER_H__67418FB6_6048_48FA_86D4_F412CACC41B1__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define TIMER_ENSURE_VIEWER_IN_CHAIN 6
#define TIMER_DRAW_CLIPBOARD 7
#define TIMER_PING 8
class CClipboardViewer : public CWnd
{
// Construction
public:
CClipboardViewer(CCopyThread* pHandler);
virtual ~CClipboardViewer();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CClipboardViewer)
//}}AFX_VIRTUAL
// Implementation
public:
void Create();
HWND m_hNextClipboardViewer;
bool m_bCalling_SetClipboardViewer;
bool m_bPinging;
bool m_bConnect;
bool m_bIsConnected;
bool m_connectOnStartup;
CString m_activeWindow;
CString m_activeWindowTitle;
// m_pHandler->OnClipboardChange is called when the clipboard changes.
CCopyThread* m_pHandler;
void Connect(); // connects as a clipboard viewer
void Disconnect(bool bSendPing = true); // disconnects as a clipboard viewer
void SendPing();
bool GetConnect() { return m_bConnect; }
void SetConnect(bool bConnect);
void SetEnsureConnectedTimer();
bool ValidActiveWnd();
DWORD m_dwLastCopy;
// Generated message map functions
protected:
//{{AFX_MSG(CClipboardViewer)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnDestroy();
afx_msg void OnChangeCbChain(HWND hWndRemove, HWND hWndAfter);
afx_msg void OnDrawClipboard();
afx_msg void OnTimer(UINT_PTR nIDEvent);
//}}AFX_MSG
afx_msg LRESULT OnSetConnect(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT CClipboardViewer::OnClipboardChange(WPARAM wParam, LPARAM lPara);
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CLIPBOARDVIEWER_H__67418FB6_6048_48FA_86D4_F412CACC41B1__INCLUDED_)