MFC:控件集合 1.静态文本(Static Text) 2.编辑框(Edit Control) 3.按钮(Button) 4.下拉框(Combo Box) 5.组合框(Group Box)

2.编辑框(Edit Control)

3.按钮(Button)

/*1.在头文件里面添加按钮实现的函数声明*/
 
//test.h
afx_msg void OnBnClickedButtonTest();	//点击按钮
 
/*2.添加消息映射*/
 
//test.cpp
BEGIN_MESSAGE_MAP(CTestDlg, CDialogEx)
	ON_BN_CLICKED(IDC_BUTTON1, &CTestDlg::OnBnClickedButtonTest)
END_MESSAGE_MAP()
 
 
/*3.添加函数实现*/
//test.cpp
void CTestDlg::OnBnClickedButtonTest(){
 
}

4.下拉框(Combo Box)

5.组合框(Group Box)