comboboxdlg.cpp

来自「This is Visual C++ basis operation. Usin」· C++ 代码 · 共 55 行

CPP
55
字号
// ComboBoxDlg.cpp : implementation file
//

#include "stdafx.h"
#include "exam7_3.h"
#include "ComboBoxDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CComboBoxDlg dialog


CComboBoxDlg::CComboBoxDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CComboBoxDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CComboBoxDlg)
	m_Index = -1;
	//}}AFX_DATA_INIT
}


void CComboBoxDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CComboBoxDlg)
	DDX_Control(pDX, IDC_COMBO1, m_combobox);
	DDX_CBIndex(pDX, IDC_COMBO1, m_Index);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CComboBoxDlg, CDialog)
	//{{AFX_MSG_MAP(CComboBoxDlg)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CComboBoxDlg message handlers

BOOL CComboBoxDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	
	m_combobox.SetCurSel(m_Index); 
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

⌨️ 快捷键说明

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