bf30aeb729ff39ce4ae57016f3caa4648e3849dd
[matches/honours.git] / research / transmission_spectroscopy / TOF / Win32++ / tutorials / Tutorial7 / View.h
1 //////////////////////////////////////////////////////\r
2 // View.h\r
3 //  Declaration of the CView class\r
4 \r
5 #ifndef VIEW_H\r
6 #define VIEW_H\r
7 \r
8 \r
9 #include "wincore.h"\r
10 #include <vector>\r
11 \r
12 using std::vector;\r
13 \r
14 \r
15 class CView : public CWnd\r
16 {\r
17 public:\r
18         CView();\r
19         virtual ~CView();\r
20         virtual void SetPen(COLORREF  Color);\r
21 \r
22 protected:\r
23         virtual void OnDraw(CDC* pDC);\r
24         virtual void PreCreate(CREATESTRUCT &cs);\r
25         virtual void PreRegisterClass(WNDCLASS &wc);\r
26         virtual LRESULT WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam);\r
27 \r
28 private:\r
29         struct PlotPoint\r
30         {\r
31                 int x;\r
32                 int y;\r
33                 bool PenDown;\r
34                 COLORREF color;\r
35         };\r
36 \r
37         void DrawLine(int x, int y);\r
38         void OnLButtonDown(LPARAM lParam);\r
39         void OnLButtonUp(LPARAM lParam);\r
40         void OnMouseMove(WPARAM wParam, LPARAM lParam);\r
41         void StorePoint(int x, int y, bool PenDown);\r
42 \r
43         CBrush m_Brush;\r
44         vector<PlotPoint> m_points;     // Points of lines to draw\r
45         COLORREF m_PenColor;\r
46 };\r
47 \r
48 \r
49 #endif // CVIEW_H\r

UCC git Repository :: git.ucc.asn.au