81 lines
1.8 KiB
C++
81 lines
1.8 KiB
C++
#pragma once
|
|
#include "resource.h"
|
|
#include "afxwin.h"
|
|
#include "afxcmn.h"
|
|
#include "GsPreviewCtrl.h"
|
|
#include "uiiado.h"
|
|
|
|
class CGLTKDlg : public CDialog
|
|
{
|
|
DECLARE_DYNAMIC(CGLTKDlg)
|
|
|
|
public:
|
|
static void drawRegion(LPCTSTR psz, CGsPreviewCtrl& wndCtrl);
|
|
static void drawPoolCell(LPCTSTR psz, CGsPreviewCtrl& wndCtrl);
|
|
|
|
public:
|
|
typedef void(*drawPreview)(LPCTSTR, CGsPreviewCtrl&);
|
|
|
|
public:
|
|
// 操作类型
|
|
enum OPERA
|
|
{
|
|
// 入库
|
|
eInput = 0,
|
|
// 选择
|
|
eSelect,
|
|
};
|
|
|
|
public:
|
|
CGLTKDlg(OPERA opera
|
|
, LPCTSTR db
|
|
, LPCTSTR table
|
|
, drawPreview pFunc
|
|
, CWnd* pParent = NULL);
|
|
virtual ~CGLTKDlg();
|
|
|
|
void SetCrossSectionScr(const CString& sCrossSectionScr);
|
|
BOOL GetCrossSectionScr(CString& sCrossSectionScr) const;
|
|
|
|
enum { IDD = IDD_GLTK_DLG };
|
|
|
|
protected:
|
|
virtual void DoDataExchange(CDataExchange* pDX);
|
|
|
|
DECLARE_MESSAGE_MAP()
|
|
public:
|
|
virtual BOOL OnInitDialog();
|
|
afx_msg void OnBnClickedAddCity();
|
|
afx_msg void OnBnClickedAddStandard();
|
|
afx_msg void OnBnClickedInput();
|
|
afx_msg void OnBnClickedOk();
|
|
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
|
|
afx_msg void OnTvnSelchangedTree1(NMHDR *pNMHDR, LRESULT *pResult);
|
|
afx_msg void OnAddCity();
|
|
afx_msg void OnDelItem();
|
|
afx_msg void OnDelSection();
|
|
afx_msg void OnAddStandard();
|
|
afx_msg void OnNMRClickTree1(NMHDR *pNMHDR, LRESULT *pResult);
|
|
afx_msg void OnLvnItemchangedList1(NMHDR *pNMHDR, LRESULT *pResult);
|
|
afx_msg void OnNMRClickList1(NMHDR *pNMHDR, LRESULT *pResult);
|
|
|
|
void RefreshPreviewCtrl();
|
|
void ShowCityEwStdTree();
|
|
|
|
protected:
|
|
|
|
int m_nItemSel;
|
|
bool m_bScrForAddToDb;
|
|
CString m_sCrossSectionScr;
|
|
CGsPreviewCtrl m_wndViewCtrl;
|
|
CImageList m_ImageList;
|
|
CEdit m_wndScrEdit;
|
|
CListCtrl m_wndList;
|
|
CTreeCtrl m_wndTree;
|
|
OPERA m_eOpera;
|
|
CUIISQLiteServer m_server;
|
|
CString m_sDbName;
|
|
CString m_sTblName;
|
|
drawPreview m_pFunc;
|
|
};
|