#if !defined(AFX_SPSHEET_H__71915B01_F1A5_444B_AD7F_AB1776C1DE87__INCLUDED_) #define AFX_SPSHEET_H__71915B01_F1A5_444B_AD7F_AB1776C1DE87__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // SPSheet.h : header file // ///////////////////////////////////////////////////////////////////////////// // CSPSheet #include "resource.h" #include "NewUI.h" class CSPSheet : public CPropertySheet { DECLARE_DYNAMIC(CSPSheet) protected: List pageList; static int cur; // Construction public: CSPSheet(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0); CSPSheet(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0); void AddPage(CPropertyPage*pPage); // Attributes public: // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CSPSheet) public: virtual BOOL OnInitDialog(); //}}AFX_VIRTUAL // Implementation public: virtual ~CSPSheet(); // Generated message map functions protected: //{{AFX_MSG(CSPSheet) afx_msg void OnDestroy(); //}}AFX_MSG afx_msg void OnOK(); DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// // CCurtainWallSet dialog class CCurtainWallSet : public CPropertyPage { DECLARE_DYNCREATE(CCurtainWallSet) protected: bool bCreate;//当前状态是编辑还是创建. public: CCurtainWallSet(); ~CCurtainWallSet(); inline void SetWallLength(double l){sLength=Dist2Str(l);} void Init(TDbCurtainWall&cWall,bool bOut=true); // Dialog Data //{{AFX_DATA(CCurtainWallSet) enum { IDD = IDD_CURTAIN_WALL1 }; //}}AFX_DATA CInputCombo layerCombo; CSpinButtonCtrl vSpin; CSpinButtonCtrl hSpin; CString sLength; CString sHeight; WDGrid vListBox; WDGrid hListBox; static BOOL bHAverage; static BOOL bBotFrame; static BOOL bTopFrame; static BOOL bVAverage; static int hNum; static int vNum; static CString layer; // Overrides // ClassWizard generate virtual function overrides //{{AFX_VIRTUAL(CCurtainWallSet) public: protected: virtual BOOL OnInitDialog(); virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: // Generated message map functions //{{AFX_MSG(CCurtainWallSet) afx_msg void OnChangeRowHeight(); afx_msg void OnChangeColWidth(); afx_msg void OnChangeHnum(); afx_msg void OnChangeVnum(); afx_msg void OnVcheck(); afx_msg void OnHcheck(); afx_msg void OnChangeHeight(); afx_msg void OnKillFocusHnum();//add by fxj 090423 afx_msg void OnKillFocusVnum(); //add by fxj 090423 // afx_msg void OnDestroy();//add by fxj 090424 //}}AFX_MSG DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// // CWndPreView window class CWndPreView : public CWnd { // Construction public: CWndPreView(); protected: bool bVFrame;//竖挺还是横框 double glassOffset;//玻璃偏移(竖挺) double frameOffset;//横框偏移(横框) double width,length;//框截面大小 double basePos;//基线位置 CBrush glassBrush,frameBrush; CPoint oldPoint; double extent; double thick;//玻璃演示厚度 // Attributes public: inline void SetFrameHide() { if (bVFrame) SetGlassOffset(length/2-thick/2-basePos); else SetFrameOffset(glassOffset-length/2+thick/2); } inline int GetGlassOffset(){return (int)glassOffset;} inline void SetHFrame(){bVFrame=false;} inline void SetBaseLine(double pos){basePos=pos;} inline void SetGlassOffset(double offset){glassOffset=offset;} inline void SetFrameOffset(double offset){frameOffset=offset;} inline void SetLength(double cx) {extent=cx*3;thick=cx/8;length=cx;width=cx/2;} inline void SetThick(double t){thick=t;}//unused // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CWndPreView) //}}AFX_VIRTUAL // Implementation public: virtual ~CWndPreView(); // Generated message map functions protected: //{{AFX_MSG(CWndPreView) afx_msg void OnPaint(); afx_msg BOOL OnEraseBkgnd(CDC* pDC); afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// // CGlassFrameSet dialog class CGlassFrameSet : public CPropertyPage {//玻璃框 DECLARE_DYNCREATE(CGlassFrameSet) // Construction protected: bool bVFrame;//是否竖挺 CGlassFrameSet *pBuddy; void SetOffset(int offset); bool bValidWnd;//窗口是否已创建。 public: CGlassFrameSet(); CGlassFrameSet(UINT resourceID); ~CGlassFrameSet(); inline void SetBuddy(CGlassFrameSet*pWnd){pBuddy=pWnd;} inline int GetBaseType(){return baseType;} inline int GetGlassOffset(){return glassOffset;} void SetBaseType(int t,int pos); void SetGlassOffset(int of); void Init(TDbCurtainWall&cWall,bool bOut=true); // Dialog Data //{{AFX_DATA(CGlassFrameSet) //}}AFX_DATA enum { IDD = IDD_CURTAIN_WALL3 }; CInputCombo layCombo; CComboBox lengthCombo; CComboBox widthCombo; CComboBox baseCombo; CSpinButtonCtrl offsetSpin; CWndPreView preViewWnd; BOOL bHide; int offset; CString sLength; CString sWidth; CString layer; static int baseType;//-1左,0中,1,右 static CString sVLength; static CString sVWidth; static CString vFrameLayer; static BOOL bVHide; static int glassOffset; static int oldGlassOffset; static CString sHLength; static CString sHWidth; static CString hFrameLayer; static BOOL bHHide; static int frameOffset; // Overrides // ClassWizard generate virtual function overrides //{{AFX_VIRTUAL(CGlassFrameSet) public: virtual BOOL OnInitDialog(); protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: // Generated message map functions //{{AFX_MSG(CGlassFrameSet) afx_msg void OnChangeOffset(); afx_msg void OnEditchangeLength(); afx_msg void OnSelchangeLength(); afx_msg void OnSelchangeBase(); afx_msg void OnHide(); afx_msg void OnDestroy(); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_SPSHEET_H__71915B01_F1A5_444B_AD7F_AB1776C1DE87__INCLUDED_)