📄 childric.cpp
字号:
///////////////////////////////////////////////////////////////////////////
// File: childric.cpp
// Version: 1.1.0.4
// Updated: 19-Jul-1998
//
// RTF Child frame core
//
// Copyright: Ferdinand Prantl
// E-mail: prantl@ff.cuni.cz
//
// You are free to use or modify this code to the following restrictions:
// - Acknowledge me somewhere in your about box, simple "Parts of code by.."
// will be enough. If you can't (or don't want to), contact me personally.
// - LEAVE THIS HEADER INTACT
////////////////////////////////////////////////////////////////////////////
// childric.cpp : implementation of the CChildFrame class
//
#include "stdafx.h"
#include "editpad.h"
#include "childric.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CRichChildFrame
IMPLEMENT_DYNCREATE (CRichChildFrame, CMDIChildWnd)
BEGIN_MESSAGE_MAP (CRichChildFrame, CMDIChildWnd)
//{{AFX_MSG_MAP(CRichChildFrame)
ON_WM_SHOWWINDOW()
ON_WM_CLOSE()
ON_WM_CREATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP ()
/////////////////////////////////////////////////////////////////////////////
// CRichChildFrame construction/destruction
CRichChildFrame::CRichChildFrame () : m_bFirstShown (TRUE)
{
// TODO: add member initialization code here
}
CRichChildFrame:: ~ CRichChildFrame ()
{
}
BOOL CRichChildFrame::
OnCreateClient (LPCREATESTRUCT /*lpcs */ ,
CCreateContext * pContext)
{
return m_wndSplitter.Create (this,
2, 2, // TODO: adjust the number of rows, columns
CSize (10, 10), // TODO: adjust the minimum pane size
pContext);
}
BOOL CRichChildFrame::
PreCreateWindow (CREATESTRUCT & cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
if (!CMDIChildWnd::PreCreateWindow (cs))
return FALSE;
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CRichChildFrame diagnostics
#ifdef _DEBUG
void CRichChildFrame::
AssertValid ()
const
{
CMDIChildWnd::AssertValid ();
}
void CRichChildFrame::Dump (CDumpContext & dc)
const
{
CMDIChildWnd::Dump (dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CRichChildFrame message handlers
void CRichChildFrame::ActivateFrame(int nCmdShow)
{
// Maximise MDI child if only one active
/*if (GetMDIFrame ()->MDIGetActive ())
CMDIChildWnd::ActivateFrame (nCmdShow);
else
CMDIChildWnd::ActivateFrame (SW_SHOWMAXIMIZED); // else open maximized.*/
CMDIChildWnd::ActivateFrame (nCmdShow);
}
void CRichChildFrame::OnShowWindow(BOOL bShow, UINT nStatus)
{
if (m_bFirstShown && bShow)
{
m_bFirstShown = FALSE;
if (theApp.m_dwFlags & EP_MAXIMIZE_CHILD_WND)
{
ShowWindow(SW_SHOWMAXIMIZED);
return;
}
}
CMDIChildWnd::OnShowWindow(bShow, nStatus);
}
void CRichChildFrame::OnClose()
{
// TODO: Add your message handler code here and/or call default
CMDIChildWnd::OnClose();
}
int CRichChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1)
return -1;
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -