-
Notifications
You must be signed in to change notification settings - Fork 1
/
MainFrm.h
50 lines (40 loc) · 1.18 KB
/
MainFrm.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
// MainFrm.h
#ifndef _MAINFRM_H
#define _MAINFORM_H
#include <afxwin.h>
class Paper;
class Label;
class CMainFrame:public CFrameWnd
{
public:
CMainFrame();
~CMainFrame();
public:
Paper* paper;
Label* label;
int row;
int column;
int m_cxChar; // Average character width
int cyChar; // Character height
int m_nTextPos; // Index of current character in text box
CPoint ptTextOrigin; // Origin for drawing input text
CPoint m_ptCaretPos; // Current caret position
CString m_strInputText; // Input text
int shift;
CPoint ptStart;
protected:
void DrawInputText (CDC* pDC);
void PositionCaret (CDC* pDC = NULL);
void DrawBackground(CDC* pDC);
protected:
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnClose();
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnPaint();
afx_msg void OnSetFocus (CWnd* pWnd);
afx_msg void OnKillFocus (CWnd* pWnd);
DECLARE_MESSAGE_MAP()
};
#endif //_MAINFORM_H