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

📄 tableinfbar.cpp

📁 打印数据生成和模拟
💻 CPP
字号:
// TableInfBar.cpp : implementation file
//

#include "stdafx.h"
#include "..\ToolSoftForPrint.h"
#include "TableInfBar.h"

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

/////////////////////////////////////////////////////////////////////////////
// CTableInfBar

CTableInfBar::CTableInfBar()
{
}

CTableInfBar::~CTableInfBar()
{
}
void CTableInfBar::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);
}
LONG CTableInfBar::OnTabActivate(WPARAM wParam, LPARAM lParam)
{
	for(int i=0;i<m_wndTabs.GetTabsNum();i++)
		m_wndTabs.GetTabInfo(i)->m_uiIcon =(UINT) (i == (int)wParam ? 0:1);
	

	return 0;
}
int CTableInfBar::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CBCGSizingControlBar::OnCreate(lpCreateStruct) == -1)
		return -1;
	CRect rectDummy;
	if (this)
		this->SetWindowText("数据文件列表");
	rectDummy.SetRectEmpty ();
	
	// Create tabs window:
	if (!m_wndTabs.Create (CBCGTabWnd::STYLE_3D, rectDummy, this, 1))
	{
		TRACE0("Failed to create workspace tab window\n");
		return -1;      // fail to create
	}
	
	m_wndTabs.SetImageList (IDB_BITMAP_LEDLED, 16, RGB (255, 0, 255));
	
	const DWORD dwViewStyle =	WS_CHILD | WS_VISIBLE | TVS_HASLINES | 
								TVS_LINESATROOT | TVS_HASBUTTONS;
	
	if(!m_List.Create(IDD_tblist,&m_wndTabs))
	{
		TRACE0("Failed to create workspace view\n");
		return -1;    
	}



	m_wndTabs.SetOwner(this);
	m_wndTabs.ShowWindow(SW_SHOW);	
	// Attach tree windows to tab:
	m_wndTabs.AddTab (&m_List,  _T("模拟数据列表"), 0);
	m_List.SetOwner(this);

	
	return 0;
}

BEGIN_MESSAGE_MAP(CTableInfBar, CToolBarCtrl)
	//{{AFX_MSG_MAP(CTableInfBar)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		ON_WM_CREATE()
        ON_WM_SIZE()
		ON_REGISTERED_MESSAGE(BCGM_CHANGE_ACTIVE_TAB,OnTabActivate)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CTableInfBar message handlers

⌨️ 快捷键说明

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