#pragma once #include "/EgtDev/Include/EGkPoint3d.h" #include #include class IEGrScene ; //---------------------------------------------------------------------------- class TestEGrView : public CWnd { public : TestEGrView( void) ; ~TestEGrView( void) ; bool Create( CWnd* pParent, int nID) ; bool StartScene( int nDriver, bool b2Buff, int nColorBits, int nDepthBits) ; IEGrScene* GetScene( void) { return m_pScene ; } bool GetSceneInfo( std::string& sInfo) ; void Destroy( void) ; bool Resize( int nX, int nY, int nW, int nH) ; void Redraw( void) ; void ShowMode( UINT nID) ; void ShowCurveDir( bool bShow) ; void Zoom( UINT nID) ; void View( UINT nID) ; void SetAnalyze( void) ; void SetGetDistance( void) ; protected : afx_msg void OnPaint( void) ; afx_msg BOOL OnEraseBkgnd( CDC* pDC) { return TRUE ; } afx_msg void OnLButtonDown( UINT nFlags, CPoint point) ; afx_msg void OnLButtonUp( UINT nFlags, CPoint point) ; afx_msg void OnRButtonUp( UINT nFlags, CPoint point) ; afx_msg void OnSelSnapPoint( UINT nID) ; afx_msg void OnMButtonDown( UINT nFlags, CPoint point) ; afx_msg void OnMButtonUp( UINT nFlags, CPoint point) ; afx_msg void OnMouseMove( UINT nFlags, CPoint point) ; afx_msg BOOL OnMouseWheel( UINT nFlags, short zDelta, CPoint point) ; virtual BOOL OnGesturePan( CPoint ptFRom, CPoint ptTO) ; virtual BOOL OnGestureRotate( CPoint ptCenter, double dblAngle) ; virtual BOOL OnGesturePressAndTap( CPoint ptPress, long lDelta) ; private : HDC GetSafeHdc( void) { return ( ( m_pDC != nullptr) ? m_pDC->GetSafeHdc() : nullptr) ; } void ShowCursorCoordinates( const Point3d& ptWin) ; private : enum Status { ST_NULL = 0, ST_PAN, ST_ROT, ST_ZOOMWIN, ST_ANALYZE, ST_GETDIST, ST_GETDIST2} ; private : CClientDC* m_pDC ; IEGrScene* m_pScene ; Status m_nStatus ; Status m_nOldStatus ; CPoint m_PrevPoint ; Point3d m_ptPrev ; int m_nSnapPoint ; DECLARE_MESSAGE_MAP() } ;