#pragma once #include "afxcmn.h" #include "resource.h" #include "afxwin.h" #include "BlkRecsPreviewCtrl.h" #include "XListCtrl.h" #include // CSelectTankDLG dialog class CSelectTankDLG : public CDialog { DECLARE_DYNAMIC(CSelectTankDLG) public: virtual ~CSelectTankDLG(); struct RectTank { RectTank(): _name(_T("")), _page(_T("")) {} RectTank(const double& v , const double& l , const double& b , const double& h , const double& w , LPCTSTR name , LPCTSTR page ) : _v(v), _l(l), _b(b), _h(h), _w(w), _name(name), _page(page) {} double _v, _l, _b, _h, _w; CString _name, _page; }; struct CircleTank { CircleTank():_page(_T("")) {} CircleTank(const double& v , const double& l , const double& h , const double& b , const double& s , const double& w , LPCTSTR page) : _v(v), _l(l), _h(h), _b(b), _s(s), _w(w), _page(page) {} double _v, _l, _h, _b, _s, _w; CString _page; }; static std::vector g_RectTanks; static std::vector g_CircleTanks; CSelectTankDLG(const std::vector& rect, const std::vector& circle, bool bRect, CWnd* pParent = NULL); // standard constructor // Dialog Data #ifdef AFX_DESIGN_TIME enum { IDD = IDD_SX_DLG }; #endif protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support virtual BOOL OnInitDialog(); void initListCtrls(); afx_msg void OnBnClickedOk(); DECLARE_MESSAGE_MAP() public: CListCtrl m_listCtrl; int m_nSelectIdx; private: double _v, _l, _b, _h, _w; LPCTSTR _name, _page; const std::vector& m_rectTank; const std::vector& m_circleTank; bool m_bRect; };