⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 childfrm.cpp

📁 客户端服务器源码
💻 CPP
字号:
// ChildFrm.cpp : implementation of the CChildFrame class
//

#include "stdafx.h"
#include "clientMain.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()
{
	// TODO: add member initialization code here
	
}

CChildFrame::~CChildFrame()
{
}

BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	// 为了能正常设置窗体的标题
	cs.style &= ~FWS_ADDTOTITLE;
	cs.style &= ~FWS_PREFIXTITLE;

	if( !CMDIChildWnd::PreCreateWindow(cs) )
		return FALSE;

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CChildFrame diagnostics

#ifdef _DEBUG
void CChildFrame::AssertValid() const
{
	CMDIChildWnd::AssertValid();
}

void CChildFrame::Dump(CDumpContext& dc) const
{
	CMDIChildWnd::Dump(dc);
}

void CChildFrame::OnUpdateFrameTitle(BOOL bAddToTitle)
{
	// 1 - First call default function
	//CMDIChildWnd::OnUpdateFrameTitle( bAddToTitle );

	// 2 - Now adapt the title to our taste

	//CDocument* pDoc = GetActiveDocument();
	//CString strMyTitle;
	//if( pDoc != NULL)
	//{
		//CString strDocTitle = pDoc->GetTitle();

	//strMyTitle = "材料管理";

		// 2b - Build our custom frame title
		//CString strMyTitle = strDocTitle;//+"--子系统";
	//SetWindowText( strMyTitle );
	//}
}

#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CChildFrame message handlers

void CChildFrame::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI) 
{
	// TODO: Add your message handler code here and/or call default
	CMDIChildWnd::OnGetMinMaxInfo(lpMMI);

	CRect	rectClient;
	GetClientRect(&rectClient);

	CRect	rectWindow;
	GetWindowRect(&rectWindow);

	int nWidthOverhead = rectWindow.Width() - rectClient.Width();
	int nHeightOverhead = rectWindow.Height() - rectClient.Height();

	lpMMI->ptMinTrackSize.x = 730 + nWidthOverhead;
	lpMMI->ptMinTrackSize.y = 500 + nHeightOverhead;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -