summaryrefslogtreecommitdiffabout
path: root/T42View.h
blob: f41fb1eebd3e2a44b976e160ce8d9680fabc7f13 (plain)
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
// T42View.h : header file
//

class T42View;
class T42Frame;
struct TalkEditChars;
class	CRichTalkCtl : public CRichEditCtrl	{
public:
	void SystemMessage(LPCTSTR str);
	TalkEditChars* m_pInTEC;
	TalkEditChars* m_pOuTEC;
	T42View* m_pView;
	COLORREF m_bgColor;
	CHARFORMAT m_fmtSystem;
	CHARFORMAT m_fmtUser;
	void SetColor();
	void Setup();
	void PutString(LPCTSTR str);
	void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	void PutCharacter(CHAR c);
};

/////////////////////////////////////////////////////////////////////////////
// CLocalCtl window

class CLocalCtl : public CRichTalkCtl
{
// Construction
public:
	CLocalCtl();

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CLocalCtl)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CLocalCtl();

	// Generated message map functions
protected:
	//{{AFX_MSG(CLocalCtl)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////
// CRemoteCtl window

class CRemoteCtl : public CRichTalkCtl
{
// Construction
public:
	CRemoteCtl();

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CRemoteCtl)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CRemoteCtl();

	// Generated message map functions
protected:
	//{{AFX_MSG(CRemoteCtl)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////
// CSplitBar window

class CSplitBar : public CStatic
{
// Construction
public:
	CSplitBar();

// Attributes
public:
	int m_Ort;

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSplitBar)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CSplitBar();

	// Generated message map functions
protected:
	//{{AFX_MSG(CSplitBar)
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnPaint();
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////
// T42View form view

#ifndef __AFXEXT_H__
#include <afxext.h>
#endif

class T42View : public CFormView
{
protected:
	T42View();           // protected constructor used by dynamic creation
	DECLARE_DYNCREATE(T42View)

// Form Data
public:
	static DWORD CALLBACK ESINProc(DWORD dwCookie,LPBYTE pbBuff,LONG cb,LONG FAR *pcb);
	void SystemMessage(LPCTSTR str);
	void LoadLayout();
	void SaveLayout();
	void SetEnable(BOOL bEnable);
	BOOL m_bEnabled;
	HCURSOR m_hHorzCursor;
	HCURSOR m_hVertCursor;
	T42Frame* m_pFrame;
	BOOL m_bTracking;
	BOOL m_bShown;
	enum	_orientation	{
		ortHorizontal,
		ortVertical
	}	m_Ort;
	void RecalcLayout();
	UINT m_gapSize;
	UINT m_remoteSize;
	UINT m_localSize;
	CRemoteCtl m_remoteCtl;
	CLocalCtl m_localCtl;
	//{{AFX_DATA(T42View)
	enum { IDD = IDD_T42VIEW };
	CSplitBar	m_splitCtl;
	//}}AFX_DATA

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(T42View)
	public:
	virtual void OnInitialUpdate();
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	virtual ~T42View();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	// Generated message map functions
	//{{AFX_MSG(T42View)
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg LRESULT OnSplitterBDown(WPARAM,LPARAM);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
	afx_msg void OnWindowSplitequally();
	afx_msg void OnUpdateWindowHorizontalsplit(CCmdUI* pCmdUI);
	afx_msg void OnUpdateWindowVerticalsplit(CCmdUI* pCmdUI);
	afx_msg void OnWindowHorizontalsplit();
	afx_msg void OnWindowVerticalsplit();
	afx_msg void OnEditCopy();
	afx_msg void OnEditPaste();
	afx_msg void OnUpdateEditPaste(CCmdUI* pCmdUI);
	afx_msg void OnCancelMode();
	afx_msg void OnUpdateTeaSave(CCmdUI* pCmdUI);
	afx_msg void OnTeaSave();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////