CHILDFRM.CPP
上传用户:alisonmail
上传日期:2013-02-28
资源大小:500k
文件大小:2k
- // ChildFrm.cpp : implementation of the CChildFrame class
- //
- #include "stdafx.h"
- #include "ImageView.h"
- #include "MainFrm.h"
- #include "ImageViewDoc.h"
- #include "ImageViewView.h"
- #include "ChildFrm.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_GETMINMAXINFO()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CChildFrame construction/destruction
- CChildFrame::CChildFrame()
- {
- m_nWidth = 300;
- m_nHeight = 150;
- }
- CChildFrame::~CChildFrame()
- {
- }
- BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
- {
- // TODO: Modify the Window class or styles here by modifying
- // the CREATESTRUCT cs
- return CMDIChildWnd::PreCreateWindow(cs);
- }
- /////////////////////////////////////////////////////////////////////////////
- // 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::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI)
- {
- lpMMI->ptMinTrackSize.x = lpMMI->ptMinTrackSize.y = 40;
- lpMMI->ptMaxTrackSize.x =
- m_nWidth +
- ::GetSystemMetrics( SM_CXBORDER ) * 2 +
- ::GetSystemMetrics( SM_CXFRAME ) * 2 + 2;
- lpMMI->ptMaxTrackSize.y =
- m_nHeight +
- ::GetSystemMetrics( SM_CYBORDER ) * 2 +
- ::GetSystemMetrics( SM_CYFRAME ) * 2 +
- ::GetSystemMetrics( SM_CYCAPTION ) + 2;
-
- CMDIChildWnd::OnGetMinMaxInfo(lpMMI);
- }