// HelloFrm.cpp : implementation of the CHelloFrame class // // This is a part of the Microsoft Foundation Classes C++ library. // Copyright (C) 1992-1998 Microsoft Corporation // All rights reserved. // // This source code is only intended as a supplement to the // Microsoft Foundation Classes Reference and related // electronic documentation provided with the library. // See these sources for detailed information regarding the // Microsoft Foundation Classes product. #include "stdafx.h" #include "resource.h" #include "HelloFrm.h" #ifdef _DEBUG # define new DEBUG_NEW # undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CHelloFrame IMPLEMENT_DYNCREATE(CHelloFrame, CChildWnd) BEGIN_MESSAGE_MAP(CHelloFrame, CChildWnd) //{{AFX_MSG_MAP(CHelloFrame) ON_COMMAND(ID_TEAROFF_CLOSE_ITEM, OnCloseItem) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CHelloFrame construction/destruction CHelloFrame::CHelloFrame() { } CHelloFrame::~CHelloFrame() { } BOOL CHelloFrame::PreCreateWindow(CREATESTRUCT& cs) { return CMDIChildWnd::PreCreateWindow(cs); } ///////////////////////////////////////////////////////////////////////////// // CHelloFrame diagnostics #ifdef _DEBUG void CHelloFrame::AssertValid() const { CMDIChildWnd::AssertValid(); } void CHelloFrame::Dump(CDumpContext& dc) const { CMDIChildWnd::Dump(dc); } #endif //_DEBUG ///////////////////////////////////////////////////////////////////////////// // CHelloFrame message handlers void CHelloFrame::OnCloseItem() { XTP_SAFE_CALL2(GetMDIFrame(), GetActiveFrame(), SendMessage(WM_CLOSE, 0, 0)); }