ARGH
[matches/honours.git] / research / transmission_spectroscopy / TOF / Win32++ / samples / MDIFrameDemo / src / MDIChildMax.cpp
1 //////////////////////////////////////////////\r
2 // MDIChildMax.cpp\r
3 //  Definitions for the CViewMax and CMDIChildMax classes\r
4 \r
5 #include "stdafx.h"\r
6 #include "MDIChildMax.h"\r
7 #include "resource.h"\r
8 \r
9 \r
10 // CViewMax definitions\r
11 void CViewMax::OnDraw(CDC* pDC)\r
12 {\r
13         //Centre some text in our view window\r
14         CRect rc = GetClientRect();\r
15         pDC->DrawText(_T("Maxed Window"), -1, rc, DT_CENTER|DT_VCENTER|DT_SINGLELINE);\r
16 }\r
17 \r
18 \r
19 // CMDIChildMax definitions\r
20 CMDIChildMax::CMDIChildMax()\r
21 {\r
22         HINSTANCE hResource = GetApp()->GetResourceHandle();\r
23         HMENU hChildMenu = LoadMenu(hResource, _T("MdiMenuMax"));\r
24         SetHandles(hChildMenu, NULL);\r
25         SetView(m_MaxView);\r
26 }\r
27 \r
28 CMDIChildMax::~CMDIChildMax()\r
29 {\r
30 }\r
31 \r
32 void CMDIChildMax::OnInitialUpdate()\r
33 {\r
34         SetWindowText(_T("Maximised Window"));\r
35         SetIconLarge(IDI_MAX);\r
36         SetIconSmall(IDI_MAX);\r
37 }\r
38 \r
39 void CMDIChildMax::PreCreate(CREATESTRUCT &cs)\r
40 {\r
41         cs.style = WS_MAXIMIZE;\r
42 }\r
43 \r
44 LRESULT CMDIChildMax::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam)\r
45 {\r
46         switch (uMsg)\r
47         {\r
48                 case WM_SIZE:\r
49                         Invalidate();\r
50                         break;  // Continue with default processing\r
51 \r
52         }\r
53         return WndProcDefault(uMsg, wParam, lParam);\r
54 }\r

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