1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- // ChildFrm.cpp : implementation of the CChildFrame class
- //
- #include "stdafx.h"
- #include "LYFZIPManage.h"
- #include "ChildFrm.h"
- #include "MainFrm.H"
- #include "MyMdi.H"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CChildFrame
- IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd)
- BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd)
- //{{AFX_MSG_MAP(CChildFrame)
- ON_WM_CLOSE()
- ON_WM_SHOWWINDOW()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CChildFrame construction/destruction
- CChildFrame::CChildFrame()
- {
- // TODO: add member initialization code here
-
- }
- CChildFrame::~CChildFrame()
- {
- }
- /////////////////////////////////////////////////////////////////////////////
- // CChildFrame diagnostics
- #ifdef _DEBUG
- void CChildFrame::AssertValid() const
- {
- CMDIChildWnd::AssertValid();
- }
- void CChildFrame::Dump(CDumpContext& dc) const
- {
- CMDIChildWnd::Dump(dc);
- }
- #endif //_DEBUG
- /////////////////////////////////////////////////////////////////////////////
- // CChildFrame message handlers
- void CChildFrame::ActivateFrame(int nCmdShow)
- {
- // TODO: Add your specialized code here and/or call the base class
- CString strName;
- CMyMdi mdi;
- CMDIChildWnd::ActivateFrame(nCmdShow);
- //strName = ((CMainFrame*)AfxGetMainWnd())->m_Mdi.GetName(this);
- strName = mdi.GetName((CWnd*)this);
- SetWindowText(strName);
- }
- void CChildFrame::OnClose()
- {
- // TODO: Add your message handler code here and/or call default
- CMyMdi mdi;
- if(mdi.ChildClose((CWnd*)this))
- {
- CMDIChildWnd::OnClose();
- }
- }
- void CChildFrame::OnShowWindow(BOOL bShow, UINT nStatus)
- {
- CMyMdi mdi;
- if(bShow && mdi.GetCount() == 1)
- ShowWindow(SW_MAXIMIZE);
- else
- CMDIChildWnd::OnShowWindow(bShow, nStatus);
- // TODO: Add your message handler code here
- }
|