1 //////////////////////////////////////////////
\r
3 // Definitions for the CViewMax and CMDIChildMax classes
\r
6 #include "MDIChildMax.h"
\r
7 #include "resource.h"
\r
10 // CViewMax definitions
\r
11 void CViewMax::OnDraw(CDC* pDC)
\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
19 // CMDIChildMax definitions
\r
20 CMDIChildMax::CMDIChildMax()
\r
22 HINSTANCE hResource = GetApp()->GetResourceHandle();
\r
23 HMENU hChildMenu = LoadMenu(hResource, _T("MdiMenuMax"));
\r
24 SetHandles(hChildMenu, NULL);
\r
28 CMDIChildMax::~CMDIChildMax()
\r
32 void CMDIChildMax::OnInitialUpdate()
\r
34 SetWindowText(_T("Maximised Window"));
\r
35 SetIconLarge(IDI_MAX);
\r
36 SetIconSmall(IDI_MAX);
\r
39 void CMDIChildMax::PreCreate(CREATESTRUCT &cs)
\r
41 cs.style = WS_MAXIMIZE;
\r
44 LRESULT CMDIChildMax::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
\r
50 break; // Continue with default processing
\r
53 return WndProcDefault(uMsg, wParam, lParam);
\r