-
Notifications
You must be signed in to change notification settings - Fork 5
/
ClipBord.h
46 lines (40 loc) · 1.25 KB
/
ClipBord.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
/*----------------------------------------------------------
ClipBordクラスヘッダ
2002/11/16 (c)Keizi
----------------------------------------------------------*/
#if !defined(AFX_CLIPBORD_H__582AEB30_7E55_42E1_8D77_A28FAD0F7294__INCLUDED_)
#define AFX_CLIPBORD_H__582AEB30_7E55_42E1_8D77_A28FAD0F7294__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
//---------------------------------------------------
// クラス定義
//---------------------------------------------------
class CClipBord
{
public:
CClipBord();
virtual ~CClipBord();
void setParent(HWND hWnd){
m_hParentWnd = hWnd;
m_hNextClipbord = ::SetClipboardViewer(hWnd);
}
BOOL getClipboardText(CString& sData);
BOOL setClipboardText(const TCHAR *szString);
void delClipView(HWND hWnd){
::ChangeClipboardChain(hWnd,getNextCb());
}
void resetClipView(HWND hWnd){
if(GetClipboardViewer() != hWnd){
::ChangeClipboardChain(hWnd,getNextCb());
m_hNextClipbord = NULL;
m_hNextClipbord = ::SetClipboardViewer(hWnd);
}
}
HWND getNextCb() {return m_hNextClipbord;};
void setNextCb(HWND hWnd) {m_hNextClipbord = hWnd;};
protected:
HWND m_hParentWnd;
HWND m_hNextClipbord;
};
#endif // !defined(AFX_CLIPBORD_H__582AEB30_7E55_42E1_8D77_A28FAD0F7294__INCLUDED_)