| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- // MainFrm.h : declaration of the class CMainFrame
- #pragma once
- #include "DllInterface.h"
- #include "PlaqueDemo.h"
- #include "Point.h"
- #include "AkimaSpline.h"
- class CPlaqueDemoApp;
- class CMainFrame : public CFrameWnd
- {
- public:
- CMainFrame();
- virtual ~CMainFrame();
- void SetRect( RECT& );
- virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
- int m_oldnbPts;
- int m_nbPts;
- CPoint m_pts[32];
- BOOL m_bPlaque1;
- BOOL m_bPlaque2;
- BOOL m_bPlaque3;
- int *m_input;
- unsigned char *m_points;
-
- CPoint m_lastPoint;
- CPoint m_newPoint;
- CPoint m_previousPoint;
- BOOL m_bCaptured;
- int m_posModif;
- std::vector< Point > m_tbPtsNouveauxTrouvesFin;
- AkimaSpline m_spline;
- CPoint m_pointCaptured;
- int m_positionxCaptured;
- int m_keyPress;
- protected:
- DECLARE_DYNCREATE(CMainFrame)
- void onInit();
- void DrawCurves();
- void DrawPoint( CDC*, CPoint&, COLORREF );
- void DrawMyText(BOOL init);
- void PrintDistance( CPoint pt );
- void PrintCoordinates( CPoint pt );
- double computeDistance(CPoint pt1, CPoint pt2);
- //{{AFX_MSG(CMainFrame)
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- 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 OnMouseMove(UINT nFlags, CPoint point);
- afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
- afx_msg void updateDisplay(CPoint point);
- afx_msg void OnOpenfile();
- afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
- afx_msg void OnSetFocus( CWnd* wnd );
- afx_msg void OnMove( int, int );
- afx_msg void OnDraw( CDC* pDC );
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- private:
- CRect GetTextRect();
- void PrintText( CString text );
- void ResizeWindow();
- HCURSOR m_hArrow;
- HCURSOR m_hCross;
- BOOL m_canChange;
- BOOL m_initialized;
- CButton m_quitBtn;
- CRect m_wRect;
- CRect m_cRect;
- CStatusBar m_sBar;
- int firstPoint;
- CImage m_image;
- DllInterface plaqueInterface;
- };
|