📄 outputbar.cpp
字号:
// OutputBar.cpp : implementation of the COutputBar class
//
#include "stdafx.h"
#include "StateCollection.h"
#include "OutputBar.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// COutputBar
BEGIN_MESSAGE_MAP(COutputBar, CBCGSizingControlBar)
//{{AFX_MSG_MAP(COutputBar)
ON_WM_CREATE()
ON_WM_SIZE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// COutputBar construction/destruction
COutputBar::COutputBar()
{
// TODO: add one-time construction code here
}
COutputBar::~COutputBar()
{
}
/////////////////////////////////////////////////////////////////////////////
// COutputBar message handlers
int COutputBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CBCGSizingControlBar::OnCreate(lpCreateStruct) == -1)
return -1;
CRect rectDummy;
rectDummy.SetRectEmpty ();
// Create tabs window:
if (!m_wndTabs.Create (CBCGTabWnd::STYLE_FLAT, rectDummy, this, 1))
{
TRACE0("Failed to create output tab window\n");
return -1; // fail to create
}
// Create tree windows.
// TODO: create your own tab windows here:
const DWORD dwViewStyle =
LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL;
if (!m_wndList1.Create (dwViewStyle, rectDummy, &m_wndTabs, 2) ||
!m_wndList2.Create (dwViewStyle, rectDummy, &m_wndTabs, 3) ||
!m_wndList3.Create (dwViewStyle, rectDummy, &m_wndTabs, 4))
{
TRACE0("Failed to create output view\n");
return -1; // fail to create
}
// Attach list windows to tab:
m_wndTabs.AddTab (&m_wndList1, _T("Output 1"), -1);
m_wndTabs.AddTab (&m_wndList2, _T("Output 2"), -1);
m_wndTabs.AddTab (&m_wndList3, _T("Output 3"), -1);
return 0;
}
void COutputBar::OnSize(UINT nType, int cx, int cy)
{
CBCGSizingControlBar::OnSize(nType, cx, cy);
// Tab control should cover a whole client area:
m_wndTabs.SetWindowPos (NULL, -1, -1, cx, cy,
SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -