|
| 1 | +// ChildFrm.cpp : implementation of the CChildFrame class |
| 2 | +// |
| 3 | + |
| 4 | +#include "stdafx.h" |
| 5 | +#include "DIPDemo.h" |
| 6 | + |
| 7 | +#include "ChildFrm.h" |
| 8 | + |
| 9 | +#ifdef _DEBUG |
| 10 | +#define new DEBUG_NEW |
| 11 | +#undef THIS_FILE |
| 12 | +static char THIS_FILE[] = __FILE__; |
| 13 | +#endif |
| 14 | + |
| 15 | +///////////////////////////////////////////////////////////////////////////// |
| 16 | +// CChildFrame |
| 17 | + |
| 18 | +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) |
| 19 | + |
| 20 | +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) |
| 21 | + //{{AFX_MSG_MAP(CChildFrame) |
| 22 | + // NOTE - the ClassWizard will add and remove mapping macros here. |
| 23 | + // DO NOT EDIT what you see in these blocks of generated code ! |
| 24 | + //}}AFX_MSG_MAP |
| 25 | +END_MESSAGE_MAP() |
| 26 | + |
| 27 | +///////////////////////////////////////////////////////////////////////////// |
| 28 | +// CChildFrame construction/destruction |
| 29 | + |
| 30 | +CChildFrame::CChildFrame() |
| 31 | +{ |
| 32 | + // TODO: add member initialization code here |
| 33 | + |
| 34 | +} |
| 35 | + |
| 36 | +CChildFrame::~CChildFrame() |
| 37 | +{ |
| 38 | +} |
| 39 | + |
| 40 | +BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs) |
| 41 | +{ |
| 42 | + // TODO: Modify the Window class or styles here by modifying |
| 43 | + // the CREATESTRUCT cs |
| 44 | + |
| 45 | + if( !CMDIChildWnd::PreCreateWindow(cs) ) |
| 46 | + return FALSE; |
| 47 | + |
| 48 | + cs.style = WS_CHILD | WS_VISIBLE | WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU |
| 49 | + | FWS_ADDTOTITLE | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX; |
| 50 | + |
| 51 | + return TRUE; |
| 52 | +} |
| 53 | + |
| 54 | +void CChildFrame::ActivateFrame(int nCmdShow) |
| 55 | +{ |
| 56 | + // TODO: Modify this function to change how the frame is activated. |
| 57 | + |
| 58 | + nCmdShow = SW_SHOWMAXIMIZED; |
| 59 | + CMDIChildWnd::ActivateFrame(nCmdShow); |
| 60 | +} |
| 61 | + |
| 62 | + |
| 63 | +///////////////////////////////////////////////////////////////////////////// |
| 64 | +// CChildFrame diagnostics |
| 65 | + |
| 66 | +#ifdef _DEBUG |
| 67 | +void CChildFrame::AssertValid() const |
| 68 | +{ |
| 69 | + CMDIChildWnd::AssertValid(); |
| 70 | +} |
| 71 | + |
| 72 | +void CChildFrame::Dump(CDumpContext& dc) const |
| 73 | +{ |
| 74 | + CMDIChildWnd::Dump(dc); |
| 75 | +} |
| 76 | + |
| 77 | +#endif //_DEBUG |
| 78 | + |
| 79 | +///////////////////////////////////////////////////////////////////////////// |
| 80 | +// CChildFrame message handlers |
0 commit comments