--- /dev/null
+//////////////////////////////////////////////\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