📄 stackedwndctrl.cpp
字号:
// StackedWndCtrl.cpp : implementation file
//
#include "stdafx.h"
#include "CBA_SYSTEM.h"
#include "StackedWndCtrl.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CStackedWndCtrl
CStackedWndCtrl::CStackedWndCtrl()
{
}
CStackedWndCtrl::~CStackedWndCtrl()
{
}
BEGIN_MESSAGE_MAP(CStackedWndCtrl, CStatic)
//{{AFX_MSG_MAP(CStackedWndCtrl)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CStackedWndCtrl message handlers
void CStackedWndCtrl::PreSubclassWindow()
{
// TODO: Add your specialized code here and/or call the base class
ModifyStyle( SS_BLACKFRAME, WS_CLIPCHILDREN );
CStatic::PreSubclassWindow();
}
int CStackedWndCtrl::AddContentPane(CWnd* pwndContent )
{
PTDS_PANE pPane = new TDS_PANE;
if( pPane == NULL )
{
AfxMessageBox( "Failed to add a new pane to the stack.\n\nOut of memory." );
return -1;
}
pPane->m_pwndContent = pwndContent;
int index = m_arrPanes.Add(pPane);
return index;
}
void CStackedWndCtrl::ShowContentPane(int index)
{
CRect rFrame;
GetClientRect( &rFrame );
if(m_arrPanes.GetSize()!=0)
{
m_arrPanes[ index]->m_pwndContent->SetWindowPos( NULL,0,rFrame.top,rFrame.Width(),rFrame.Height(),SWP_NOZORDER | SWP_SHOWWINDOW );
}
}
void CStackedWndCtrl::HideContentPane(int index)
{
m_arrPanes[ index]->m_pwndContent->ShowWindow(SW_HIDE);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -