📄 demo2005dlg.h
字号:
// demo2005Dlg.h : header file
//
#if !defined(AFX_DEMO2005DLG_H__6C176A37_4D3A_44AF_BFE9_776A87AD866D__INCLUDED_)
#define AFX_DEMO2005DLG_H__6C176A37_4D3A_44AF_BFE9_776A87AD866D__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "demoCommon.h"
typedef enum recordOperation {
_NOTOPERATED,_ADD,_DELETE,_UPDATE,_BROWSE,_QUERY,_STATISTIC} rcdOp;
/////////////////////////////////////////////////////////////////////////////
// CDemo2005Dlg dialog
class CDemo2005Dlg : public CDialog
{
// Construction
public:
void OnWizard();
CDemo2005Dlg(CWnd* pParent = NULL); // standard constructor
CEdit m_edModifiedValue;
// Dialog Data
//{{AFX_DATA(CDemo2005Dlg)
enum { IDD = IDD_DEMO2005_DIALOG };
CButton m_btnTitle;
CEdit m_edFieldName;
CComboBox m_cmbFieldType;
CEdit m_edFieldLength;
CListCtrl m_modeList;
CButton m_btnFieldAdd;
CButton m_btnFieldDelete;
CButton m_btnFieldModify;
CString m_FieldName;
CString m_FieldType;
short m_FieldLength;
CStatic m_staFieldCaption;
CEdit m_edFieldValue;
CListCtrl m_recordList;
CButton m_btnNextValue;
CString m_FieldValue;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDemo2005Dlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CDemo2005Dlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnAbout();
afx_msg void OnExit();
afx_msg void OnDbNew();
afx_msg void OnDbOpen();
afx_msg void OnDbClose();
afx_msg void OnModeEdit();
afx_msg void OnModeSave();
afx_msg void OnFieldAdd();
afx_msg void OnFieldDelete();
afx_msg void OnFieldModify();
afx_msg void OnSelchangeFieldType();
afx_msg void OnClickModeList(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnRecordAdd();
afx_msg void OnRecordDelete();
afx_msg void OnRecordUpdate();
afx_msg void OnRecordSave();
afx_msg void OnNextValue();
afx_msg void OnOK();
afx_msg void OnDblclkRecordList(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnQuery();
afx_msg void OnStatistic();
afx_msg void OnBrowse();
afx_msg void OnChangeFieldName();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
void ResetVariable();
/* functions for mode-list */
void ResetModeInfo();
void SetModelistHeader();
void ShowAllFields();
void ClearModelist();
BOOL CheckField(BOOL bNew);
/* functions for record-list */
void SetRecordlistHeader();
void ClearRecordlist();
void ShowFieldCaption(int fIndex);
// member variable
public:
void OnWizard1();
char m_fileName[256]; // file name
FILE *m_fhd; // file handler
struct fileHeader m_fileHeader; // file header
struct fieldDesc *pFieldDsc; // array of field description (ie, mode )
BOOL beModeEdit; // be editing mode
int maxFcnt; // maximum field count
int fcnt; // field count (one-based)
int nCurModeItem; // current selected item of the mode_list
fieldType ftype; // field type
// byte *pRcdBuf; // buffer for keeping records
int rcnt; // record count (one-based)
int vIndex; // field value count in a record (zero-based)
int nCurRcdItem, nCurRcdSubItem; // current selected (item,subitem) of the record_list
rcdOp rop;
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DEMO2005DLG_H__6C176A37_4D3A_44AF_BFE9_776A87AD866D__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -