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

📄 mycombobox.cpp

📁 直接对磁盘的bit数据进行读写
💻 CPP
字号:
// MyComboBox.cpp : implementation file
//

#include "stdafx.h"
#include "MFCFatline.h"
#include "MyComboBox.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMyComboBox

CMyComboBox::CMyComboBox()
{
}

CMyComboBox::~CMyComboBox()
{
}


BEGIN_MESSAGE_MAP(CMyComboBox, CComboBox)
	//{{AFX_MSG_MAP(CMyComboBox)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////


void CMyComboBox::Init()
{

	size_t szAllDriveStrings = GetLogicalDriveStrings(0,NULL);
	char *DriveBuffer = new char[szAllDriveStrings + sizeof(_T(""))];
	memset(DriveBuffer,0,sizeof(DriveBuffer[20]));
	GetLogicalDriveStrings(szAllDriveStrings,DriveBuffer);
	size_t szDriveString = strlen(DriveBuffer);
	while(szDriveString > 0)
	{
		if(GetDriveType(DriveBuffer)== DRIVE_CDROM)
		{	
			DriveBuffer += szDriveString + 1;
			szDriveString = strlen(DriveBuffer);
			continue;
		}

		AddString(DriveBuffer);
		DriveBuffer += szDriveString + 1;
		szDriveString = strlen(DriveBuffer);
	}
	AddString("PhysicalDrive0");
	SetCurSel(3);
	UpdateData(FALSE);
	
	
}


⌨️ 快捷键说明

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