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

📄 grid.cpp

📁 IC卡操作Demo 包括了常见的IC卡种类。可执行写入、读出、校验、密码修改、批量作业等功能。
💻 CPP
字号:
// Grid.cpp : implementation file
//

#include "stdafx.h"
#include "IcDemo.h"
#include "Grid.h"

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

/////////////////////////////////////////////////////////////////////////////
// CGrid

CGrid::CGrid()
{
	::GetObject((HFONT)GetStockObject(DEFAULT_GUI_FONT),sizeof(m_lf),&m_lf);
	m_font.CreateFontIndirect(&m_lf);

}

CGrid::~CGrid()
{
}


BEGIN_MESSAGE_MAP(CGrid, CListCtrl)
	//{{AFX_MSG_MAP(CGrid)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CGrid message handlers
void CGrid::SetGridStyle(BOOL bset)
{
  if(bset)
	SetExtendedStyle(LVS_EX_GRIDLINES|LVS_EX_FULLROWSELECT);    
}
void CGrid::SetGridSel(BOOL bset)
{
  if(bset)
	SetExtendedStyle(LVS_EX_FULLROWSELECT);    

}
CGrid& CGrid::SetFontSize(int nSize)
{
	nSize*=-1;
	m_lf.lfHeight = nSize;
	ReconstructFont();
	RedrawWindow();
	return *this;
}

CGrid& CGrid::SetFontBold(BOOL bBold)
{	
	m_lf.lfWeight = bBold ? FW_BOLD : FW_NORMAL;
	ReconstructFont();
	RedrawWindow();
	return *this;
}
void CGrid::ReconstructFont()
{
	m_font.DeleteObject();
	BOOL bCreated = m_font.CreateFontIndirect(&m_lf);
    SetFont(&m_font,TRUE);
	ASSERT(bCreated);
}

⌨️ 快捷键说明

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