MainFrm.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. // MainFrm.h : declaration of the class CMainFrame
  2. #pragma once
  3. #include "DllInterface.h"
  4. #include "PlaqueDemo.h"
  5. #include "Point.h"
  6. #include "AkimaSpline.h"
  7. class CPlaqueDemoApp;
  8. class CMainFrame : public CFrameWnd
  9. {
  10. public:
  11. CMainFrame();
  12. virtual ~CMainFrame();
  13. void SetRect( RECT& );
  14. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  15. int m_oldnbPts;
  16. int m_nbPts;
  17. CPoint m_pts[32];
  18. BOOL m_bPlaque1;
  19. BOOL m_bPlaque2;
  20. BOOL m_bPlaque3;
  21. int *m_input;
  22. unsigned char *m_points;
  23. CPoint m_lastPoint;
  24. CPoint m_newPoint;
  25. CPoint m_previousPoint;
  26. BOOL m_bCaptured;
  27. int m_posModif;
  28. std::vector< Point > m_tbPtsNouveauxTrouvesFin;
  29. AkimaSpline m_spline;
  30. CPoint m_pointCaptured;
  31. int m_positionxCaptured;
  32. int m_keyPress;
  33. protected:
  34. DECLARE_DYNCREATE(CMainFrame)
  35. void onInit();
  36. void DrawCurves();
  37. void DrawPoint( CDC*, CPoint&, COLORREF );
  38. void DrawMyText(BOOL init);
  39. void PrintDistance( CPoint pt );
  40. void PrintCoordinates( CPoint pt );
  41. double computeDistance(CPoint pt1, CPoint pt2);
  42. //{{AFX_MSG(CMainFrame)
  43. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  44. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  45. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  46. afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
  47. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  48. afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  49. afx_msg void updateDisplay(CPoint point);
  50. afx_msg void OnOpenfile();
  51. afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
  52. afx_msg void OnSetFocus( CWnd* wnd );
  53. afx_msg void OnMove( int, int );
  54. afx_msg void OnDraw( CDC* pDC );
  55. //}}AFX_MSG
  56. DECLARE_MESSAGE_MAP()
  57. private:
  58. CRect GetTextRect();
  59. void PrintText( CString text );
  60. void ResizeWindow();
  61. HCURSOR m_hArrow;
  62. HCURSOR m_hCross;
  63. BOOL m_canChange;
  64. BOOL m_initialized;
  65. CButton m_quitBtn;
  66. CRect m_wRect;
  67. CRect m_cRect;
  68. CStatusBar m_sBar;
  69. int firstPoint;
  70. CImage m_image;
  71. DllInterface plaqueInterface;
  72. };