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

📄 ekfixedformframe.cpp

📁 < MFC经典问答>>是微软类库经常遇到的问题
💻 CPP
字号:
// EkFixedFormFrame.cpp : implementation file
//

#include "stdafx.h"

#include "EkFixedFormFrame.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CEkFixedFormFrame

IMPLEMENT_DYNCREATE(CEkFixedFormFrame, CMDIChildWnd)

CEkFixedFormFrame::CEkFixedFormFrame()
{
}

CEkFixedFormFrame::~CEkFixedFormFrame()
{
}


BEGIN_MESSAGE_MAP(CEkFixedFormFrame, CMDIChildWnd)
	//{{AFX_MSG_MAP(CEkFixedFormFrame)
	ON_WM_CREATE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CEkFixedFormFrame message handlers

BOOL CEkFixedFormFrame::PreCreateWindow(CREATESTRUCT& cs) 
{
	// Make the frame window non-resizable
	cs.style &= ~WS_THICKFRAME;
	cs.style &= ~WS_MAXIMIZEBOX;

	return CMDIChildWnd::PreCreateWindow(cs);
}

int CEkFixedFormFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	// The child FormView should already have been created
	// by the call to CMDIChildWnd::OnCreate()
	CFormView* pFormView = static_cast< CFormView* >
								( GetDescendantWindow( AFX_IDW_PANE_FIRST, TRUE ) );
	ASSERT_VALID( pFormView );
	ASSERT_KINDOF( CFormView, pFormView );

	// Make sure that the view window size is correctly set
	RecalcLayout();

	// Make the view resize its parent frame -- that is
	// "us", normally !
	pFormView->ResizeParentToFit( FALSE );
	pFormView->ResizeParentToFit( TRUE );

	return 0;
}

⌨️ 快捷键说明

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