按钮添加图标
1.将按钮->属性->类型->图标
2.设置按钮变量:在class wizard里CButton m_ok
3.添加一个图标IDI_ICON1;
4.在protected 下声明:
HICON m_hIcon1;
5.在程序的OnInitDialog()里:
m_hIcon1 = AfxGetApp()->LoadIcon(IDI_ICON1);
m_ok.SetIcon(m_hIcon1);
2.设置按钮变量:在class wizard里CButton m_ok
3.添加一个图标IDI_ICON1;
4.在protected 下声明:
HICON m_hIcon1;
5.在程序的OnInitDialog()里:
m_hIcon1 = AfxGetApp()->LoadIcon(IDI_ICON1);
m_ok.SetIcon(m_hIcon1);