Commit before breaking everything
[matches/honours.git] / research / transmission_spectroscopy / TOF / Win32++ / samples / PropertySheet / src / View.cpp
diff --git a/research/transmission_spectroscopy/TOF/Win32++/samples/PropertySheet/src/View.cpp b/research/transmission_spectroscopy/TOF/Win32++/samples/PropertySheet/src/View.cpp
new file mode 100644 (file)
index 0000000..19d9074
--- /dev/null
@@ -0,0 +1,51 @@
+//////////////////////////////////////////////\r
+// View.cpp\r
+//  Definitions for the CView class\r
+\r
+#include "stdafx.h"\r
+#include "view.h"\r
+\r
+\r
+CView::CView()\r
+{\r
+}\r
+\r
+void CView::OnDraw(CDC* pDC)\r
+{\r
+       CRect rc = GetClientRect();\r
+\r
+       // Centre some text in our view window\r
+       pDC->DrawText(_T("Choose a Property Sheet from the menu"), -1, rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE);\r
+}\r
+\r
+void CView::OnInitialUpdate()\r
+{\r
+       // OnInitialUpdate is called immediately after the window is created\r
+       TRACE(_T("View Window Created\n"));\r
+}\r
+\r
+void CView::PreCreate(CREATESTRUCT &cs)\r
+{\r
+       // Here we set the defaults used by the create function for the view window\r
+       // Preforming this is optional, but doing so allows us to\r
+       // take more precise control over the window we create.\r
+\r
+       // Set the Window Class name\r
+       cs.lpszClass = _T("View");\r
+\r
+       // Set the extended style\r
+       cs.dwExStyle = WS_EX_CLIENTEDGE;\r
+}\r
+\r
+LRESULT CView::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam)\r
+{\r
+       switch (uMsg)\r
+       {\r
+       case WM_SIZE:\r
+               Invalidate();\r
+               break;  // Also do default processing\r
+       }\r
+\r
+       // pass unhandled messages on for default processing\r
+       return WndProcDefault(uMsg, wParam, lParam);\r
+}\r

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