提交 | 用户 | age
|
418cb3
|
1 |
|
Q |
2 |
// ConfigToolDoc.h: CConfigToolDoc 类的接口
|
|
3 |
//
|
|
4 |
|
|
5 |
|
|
6 |
#pragma once
|
|
7 |
//#include <memory>
|
|
8 |
#include <vector>
|
|
9 |
#include "../KLink1/KLink.h"
|
|
10 |
#pragma comment(lib,"../x64/release/KLink1.lib")
|
|
11 |
|
|
12 |
class CConfigToolDoc : public CDocument
|
|
13 |
{
|
|
14 |
protected: // 仅从序列化创建
|
|
15 |
CConfigToolDoc() noexcept;
|
|
16 |
DECLARE_DYNCREATE(CConfigToolDoc)
|
|
17 |
|
|
18 |
// 特性
|
|
19 |
public:
|
|
20 |
KLink1 MyKlink;
|
|
21 |
|
|
22 |
|
|
23 |
// 操作
|
|
24 |
public:
|
|
25 |
|
|
26 |
// 重写
|
|
27 |
public:
|
|
28 |
virtual BOOL OnNewDocument();
|
|
29 |
virtual void Serialize(CArchive& ar);
|
|
30 |
#ifdef SHARED_HANDLERS
|
|
31 |
virtual void InitializeSearchContent();
|
|
32 |
virtual void OnDrawThumbnail(CDC& dc, LPRECT lprcBounds);
|
|
33 |
#endif // SHARED_HANDLERS
|
|
34 |
|
|
35 |
// 实现
|
|
36 |
public:
|
|
37 |
virtual ~CConfigToolDoc();
|
|
38 |
#ifdef _DEBUG
|
|
39 |
virtual void AssertValid() const;
|
|
40 |
virtual void Dump(CDumpContext& dc) const;
|
|
41 |
#endif
|
|
42 |
//family 1
|
|
43 |
|
|
44 |
//device 2
|
|
45 |
|
|
46 |
//DEF block
|
|
47 |
|
|
48 |
// END BLOCK
|
|
49 |
|
|
50 |
//page
|
|
51 |
|
|
52 |
//DEF block
|
|
53 |
|
|
54 |
// END BLOCK
|
|
55 |
|
|
56 |
//group
|
|
57 |
|
|
58 |
//line
|
|
59 |
|
|
60 |
//BIT BITS BYTE WORD DWORD
|
|
61 |
//BLOCK
|
|
62 |
// BIT[15..14];
|
|
63 |
// BIT[13..12];
|
|
64 |
|
|
65 |
//LINE
|
|
66 |
//= BLOCK[1] WORD[5] BIT[15..12] "类型选择" SELECT "WX|WY|WR|LR"
|
|
67 |
//= BLOCK[1] WORD[5] BIT[11..0] "类型选择"
|
|
68 |
// TEXT ""
|
|
69 |
//ENDLINE
|
|
70 |
// TEXT ""
|
|
71 |
|
|
72 |
enum enTypes
|
|
73 |
{
|
|
74 |
typeNone =0,
|
|
75 |
typeText = 1,
|
|
76 |
typeInt = 2,
|
|
77 |
typeFloat = 3,
|
|
78 |
typeSelect =4,
|
|
79 |
typeCheck = 5,
|
|
80 |
typeButton = 6,
|
|
81 |
|
|
82 |
};
|
|
83 |
typedef struct tagCtrls
|
|
84 |
{
|
|
85 |
UINT nUID; //ID
|
|
86 |
int nType; //类型
|
|
87 |
CString sName; //名称
|
|
88 |
CString Value; //值
|
|
89 |
CString sTypeAddr; //对应地址
|
|
90 |
}stCtrls, * pCtrls;
|
|
91 |
|
|
92 |
std::vector <CString> Lines;
|
|
93 |
|
|
94 |
protected:
|
|
95 |
|
|
96 |
// 生成的消息映射函数
|
|
97 |
protected:
|
|
98 |
DECLARE_MESSAGE_MAP()
|
|
99 |
|
|
100 |
#ifdef SHARED_HANDLERS
|
|
101 |
// 用于为搜索处理程序设置搜索内容的 Helper 函数
|
|
102 |
void SetSearchContent(const CString& value);
|
|
103 |
#endif // SHARED_HANDLERS
|
|
104 |
public:
|
|
105 |
virtual void OnCloseDocument();
|
|
106 |
virtual BOOL SaveModified();
|
|
107 |
|
|
108 |
};
|