#ifndef _KTLINEAXISGRIDDLG_H__ #define _KTLINEAXISGRIDDLG_H__ #if _MSC_VER > 1000 #pragma once #endif #include "Resource.h" #include "BlkRecsPreviewList.h" #include "KTAxisGridListCtrl.h" class KTLineAxisGridDlg : public CDialog { public: KTLineAxisGridDlg(CWnd* pParent = NULL); ~KTLineAxisGridDlg(); public: //{{AFX_DATA(KTLineAxisGridDlg) enum { IDD = IDD_LINEAXISGRID }; CBlkRecsPreviewList m_wndPreview; CSpinButtonCtrl m_wndSpinAngle; KTAxisGridEdit m_wndAxisGridEdit; KTAxisGridListCtrl m_wndAxisGridListCtrl; CListBox m_wndDistListBox; int m_nIndex; double m_dOffset; double m_dAngle; double m_dVDis; double m_dHDis; //}}AFX_DATA //{{AFX_VIRTUAL(KTLineAxisGridDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); //}}AFX_VIRTUAL protected: //{{AFX_MSG(KTLineAxisGridDlg) virtual void OnOK(); afx_msg void OnBtempty(); afx_msg void OnButtonComeback(); afx_msg void OnBtoffsetlow(); afx_msg void OnBtoffsethig(); afx_msg void OnRadioup(); afx_msg void OnRadiodown(); afx_msg void OnRadioleft(); afx_msg void OnRadioright(); afx_msg void OnSelchangeListdist(); afx_msg void OnMessageEditInput(); virtual BOOL OnInitDialog(); afx_msg LRESULT OnItemEdited(WPARAM wparam, LPARAM lparam); afx_msg void OnDestroy(); afx_msg void OnChangeEditang(); afx_msg void OnBnClickedButton1(); //}}AFX_MSG DECLARE_MESSAGE_MAP() protected: void UpdateSpaceList(); void UpdateSpaceEdit(); void RedrawAxisGrids(); void ShowListToAxisGrid(); public: CStringArray m_arSpaceText[4]; int GetRelatingIndex(); private: void SaveToTxt(); void ReadFromTxt(); void InsertOffset(); void RefreshAngle(); void RefreshTotalDis(); double GetTotalDis(); BOOL CorrectString(CString &strSrc); BOOL IsAccordant(CString strSrc); void PushToArray(int nIndex, CString strSrc); void EnableCtrls(); void AddToolbar(); void GetSpaceVals(int nIndex,CArray& arDists); double GetTotalVal(int nIndex,const CArray& arDists); void FreeBuffer(); void ShowProBasePoint(BOOL bShow); private: int m_nLastIndex; //上一次单选钮的序号,用于插入offset值 CImageList m_ImageList; //图标 AcDbVoidPtrArray m_arEntPtrsForRedraw; // used for preview only public: double m_dEl; AcDbObjectId m_idCrossPt; }; //{{AFX_INSERT_LOCATION}} #endif //_TGLINEAXISGRIDDLG_H__