Commit before breaking everything
[matches/honours.git] / research / transmission_spectroscopy / TOF / Win32++ / tutorials / Tutorial6 / View.h
1 //////////////////////////////////////////////////////\r
2 // View.h\r
3 //  Declaration of the CView class\r
4 \r
5 \r
6 #ifndef VIEW_H\r
7 #define VIEW_H\r
8 \r
9 \r
10 #include "wincore.h"\r
11 #include <vector>\r
12 \r
13 using std::vector;\r
14 \r
15 \r
16 class CView : public CWnd\r
17 {\r
18 public:\r
19         CView();\r
20         virtual ~CView();\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         };\r
35 \r
36         void DrawLine(int x, int y);\r
37         void OnLButtonDown(LPARAM lParam);\r
38         void OnLButtonUp(LPARAM lParam);\r
39         void OnMouseMove(WPARAM wParam, LPARAM lParam);\r
40         void StorePoint(int x, int y, bool PenDown);\r
41 \r
42         CBrush m_Brush;\r
43         vector<PlotPoint> m_points;     // Points of lines to draw\r
44 };\r
45 \r
46 \r
47 #endif // CVIEW_H\r

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