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

📄 stdafx.cpp

📁 自己写的VC
💻 CPP
字号:
// stdafx.cpp : source file that includes just the standard includes
//	Tabs.pch will be the pre-compiled header
//	stdafx.obj will contain the pre-compiled type information

#include "stdafx.h"
#include "psapi.h"
#include "io.h"

void SetListBoxText(CCheckListBox *LpEventList,CString &m_Text,int &m_ListWidth)
{	
	if(LpEventList==NULL)
		return;
	LpEventList->AddString(m_Text);
	
	//计算Scorll Bar 的宽度
	CFont *LpOld=NULL,*LpFont=LpEventList->GetFont();
	CDC *dc=LpEventList->GetDC();
	if(LpFont)
	{
		LpOld=dc->SelectObject(LpFont);
	}
	
	CSize sz = dc->GetTextExtent(m_Text, m_Text.GetLength());
	sz.cx += 3 * ::GetSystemMetrics(SM_CXBORDER);
	if(sz.cx > m_ListWidth)
	{
		m_ListWidth = sz.cx;
		LpEventList->SetHorizontalExtent(m_ListWidth);
	}
	if(LpOld)
	{
		dc->SelectObject(LpOld);
	}
	LpEventList->ReleaseDC(dc);		
}

⌨️ 快捷键说明

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