#pragma once #include "resource.h" #include "xlistctrl.h" #include "simpleProperty.h" class CQuickModifyDlg : public CDialog { DECLARE_DYNAMIC(CQuickModifyDlg) public: CQuickModifyDlg(const AcDbObjectIdArray &ids, CWnd* pParent = NULL); virtual ~CQuickModifyDlg(); enum { IDD = IDD_DLG_QUICK_MODIFY }; protected: virtual void DoDataExchange(CDataExchange* pDX); virtual BOOL OnInitDialog(); void layoutControls(const int &cx, const int &cy); void initColumns(); void resetWidthOfColumnHeader(const int &width); void refreshList(); void getMoidfiedProperties(SimpleProperty::PropertySetByName &properties) const; void setPropertiesOfEntities() const; private: DECLARE_MESSAGE_MAP() afx_msg LONG_PTR onAcadKeepFocus( UINT_PTR, LONG_PTR); afx_msg void OnBnClickedOk(); afx_msg void OnSize(UINT nType, int cx, int cy); afx_msg void OnGetMinMaxInfo(MINMAXINFO* lpMMI); afx_msg LRESULT OnComboSelection(WPARAM nItem, LPARAM nSubItem); afx_msg LRESULT OnEditItemEnd(WPARAM nItem, LPARAM nSubItem); public: static void start(const AcDbObjectIdArray &id); static void command(); private: CXListCtrl m_wndList; // 对话框的最小尺寸 CSize m_szMinDlgSize; // 要修改的实体 AcDbObjectIdArray m_arIds; // 当前列表数据 SimpleProperty::PropertySetByIndex m_properties; };