VC++高手解答一下,关于通讯方面

来源:百度知道 编辑:UC知道 时间:2024/06/04 19:38:48
能不能帮我解释一下程序是什么意思:
BOOL CMaoXiGuanDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Add "About..." menu item to system menu.

// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);

CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
CString strAboutMenu;
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}

// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE);
// Set big icon

SetIcon(m_hIcon, FALSE);
// Set small icon

// TODO: Add extra init

CRs232Driver* pDrv=new CRs232Driver();
CStringArray strComArr;
pDrv->EnumDevices(strComArr);
m_cmbCom.ResetContent();
for(int i=0;i<strComArr.GetSize();i++)
m_cmbCom.AddString(strComArr.GetAt(i));
delete pDrv; 这是设置232串口的代码,至于这段代码前面那些,是系统自动生成没什么可讲的