|
// ConfigToolDoc.h: CConfigToolDoc 类的接口
|
//
|
|
|
#pragma once
|
//#include <memory>
|
#include <vector>
|
#include "../KLink1/KLink.h"
|
#pragma comment(lib,"../x64/release/KLink1.lib")
|
|
class CConfigToolDoc : public CDocument
|
{
|
protected: // 仅从序列化创建
|
CConfigToolDoc() noexcept;
|
DECLARE_DYNCREATE(CConfigToolDoc)
|
|
// 特性
|
public:
|
KLink1 MyKlink;
|
|
|
// 操作
|
public:
|
|
// 重写
|
public:
|
virtual BOOL OnNewDocument();
|
virtual void Serialize(CArchive& ar);
|
#ifdef SHARED_HANDLERS
|
virtual void InitializeSearchContent();
|
virtual void OnDrawThumbnail(CDC& dc, LPRECT lprcBounds);
|
#endif // SHARED_HANDLERS
|
|
// 实现
|
public:
|
virtual ~CConfigToolDoc();
|
#ifdef _DEBUG
|
virtual void AssertValid() const;
|
virtual void Dump(CDumpContext& dc) const;
|
#endif
|
//family 1
|
|
//device 2
|
|
//DEF block
|
|
// END BLOCK
|
|
//page
|
|
//DEF block
|
|
// END BLOCK
|
|
//group
|
|
//line
|
|
//BIT BITS BYTE WORD DWORD
|
//BLOCK
|
// BIT[15..14];
|
// BIT[13..12];
|
|
//LINE
|
//= BLOCK[1] WORD[5] BIT[15..12] "类型选择" SELECT "WX|WY|WR|LR"
|
//= BLOCK[1] WORD[5] BIT[11..0] "类型选择"
|
// TEXT ""
|
//ENDLINE
|
// TEXT ""
|
|
enum enTypes
|
{
|
typeNone =0,
|
typeText = 1,
|
typeInt = 2,
|
typeFloat = 3,
|
typeSelect =4,
|
typeCheck = 5,
|
typeButton = 6,
|
|
};
|
typedef struct tagCtrls
|
{
|
UINT nUID; //ID
|
int nType; //类型
|
CString sName; //名称
|
CString Value; //值
|
CString sTypeAddr; //对应地址
|
}stCtrls, * pCtrls;
|
|
std::vector <CString> Lines;
|
|
protected:
|
|
// 生成的消息映射函数
|
protected:
|
DECLARE_MESSAGE_MAP()
|
|
#ifdef SHARED_HANDLERS
|
// 用于为搜索处理程序设置搜索内容的 Helper 函数
|
void SetSearchContent(const CString& value);
|
#endif // SHARED_HANDLERS
|
public:
|
virtual void OnCloseDocument();
|
virtual BOOL SaveModified();
|
|
};
|