📄 set2frame.cpp
字号:
// Set2Frame.cpp : implementation file
//
#include "stdafx.h"
#include "CDMS.h"
#include "Set2Frame.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSet2Frame
IMPLEMENT_DYNCREATE(CSet2Frame, CMDIChildWnd)
CSet2Frame::CSet2Frame()
{
}
CSet2Frame::~CSet2Frame()
{
// m_pMainFrame->IsSet2FrameCreated = FALSE;
}
BEGIN_MESSAGE_MAP(CSet2Frame, CMDIChildWnd)
//{{AFX_MSG_MAP(CSet2Frame)
ON_WM_CREATE()
// ON_WM_DESTROY()
// ON_WM_MDIACTIVATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSet2Frame message handlers
BOOL CSet2Frame::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Add your specialized code here and/or call the base class
cs.style &= ~FWS_ADDTOTITLE;
return CMDIChildWnd::PreCreateWindow(cs);
}
int CSet2Frame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
/*
//<-------------获取主框架指针------------->
m_pMainFrame = (CMainFrame*)AfxGetMainWnd();
if(m_pMainFrame == NULL)
return FALSE;
//<-------------获取主框架指针------------->
// m_pMainFrame->m_pWndSet2Frame = (CWnd*)this->m_hWnd;
m_pMainFrame->m_hChildFrameSet2 = this->m_hWnd;
*/
//<-------------设置窗口标题------------->
this->SetWindowText("2#机组");
//<-------------设置窗口标题------------->
return 0;
}
/*
void CSet2Frame::OnDestroy()
{
CMDIChildWnd::OnDestroy();
// TODO: Add your message handler code here
m_pMainFrame->m_hChildFrameSet2 = NULL;
}
void CSet2Frame::OnMDIActivate(BOOL bActivate, CWnd* pActivateWnd, CWnd* pDeactivateWnd)
{
CMDIChildWnd::OnMDIActivate(bActivate, pActivateWnd, pDeactivateWnd);
// TODO: Add your message handler code here
if(bActivate)
{
m_pMainFrame->SetCurActiveFrame(FRAME_TYPE_SET2);//
}
}
LRESULT CSet2Frame::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
// TODO: Add your specialized code here and/or call the base class
switch(message)
{
case UM_ACTIVATE_FRAME2:
this->ActivateFrame();
break;
}
return CMDIChildWnd::WindowProc(message, wParam, lParam);
}
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -