VC++6.0MFC常用控件

VC++6.0MFC常用控件

ID:22228277

大小:21.95 KB

页数:5页

时间:2018-10-27

VC++6.0MFC常用控件_第1页
VC++6.0MFC常用控件_第2页
VC++6.0MFC常用控件_第3页
VC++6.0MFC常用控件_第4页
VC++6.0MFC常用控件_第5页
资源描述:

《VC++6.0MFC常用控件》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库

1、----------专业最好文档,专业为你服务,急你所急,供你所需-------------文档下载最佳的地方一般控件可用/不可用EnableWindow(TRUE);EnableWindow(FALSE); 1、StaticText------------静态控件 --类CStatic取值/赋值(变量类型为Control)m_lbl.GetWindowText(string);m_lbl.SetWindowText(string);2、EditBox---------------编辑控件 --类CEdit取值/赋值m_txt.GetWi

2、ndowText(string);m_txt.SetWindowText(string);3、CheckBox------------复选控件 --类CButton(1)设置选中/未选中m_chk.SetCheck(BST_CHECKED);   m_chk.SetCheck(BST_UNCHECKED);(2)判断是否选中intnCur=m_chk.GetCheck();nCur取值为BST_CHECKED/BST_UNCHECKED。4、RadioBox------------单选控件 --类 CButton(1)默认选中第一项m_r

3、adio.SetCheck(BST_CHECKED);(2)选中组中任一项CWnd::CheckRadioButtonSelects(addsacheckmarkto)agivenradiobuttoninagroupandclears(removesacheckmarkfrom)allotherradiobuttonsinthegroup.void CheckRadioButton(int nIDFirstButton, int nIDLastButton, int nIDCheckButton);ParametersnIDFirstB

4、uttonSpecifiestheintegeridentifierofthefirstradiobuttoninthegroup.nIDLastButtonSpecifiestheintegeridentifierofthelastradiobuttoninthegroup.nIDCheckButtonSpecifiestheintegeridentifieroftheradiobuttontobechecked.(3)判断哪一项被选中CWnd::GetCheckedRadioButtonRetrievestheIDofthecurre

5、ntlycheckedradiobuttoninthespecifiedgroup.int GetCheckedRadioButton(int nIDFirstButton, int nIDLastButton);Parameters----------专业最好文档,专业为你服务,急你所急,供你所需-------------文档下载最佳的地方----------专业最好文档,专业为你服务,急你所急,供你所需-------------文档下载最佳的地方nIDFirstButtonSpecifiestheintegeridentifierof

6、thefirstradiobuttoninthegroup.nIDLastButtonSpecifiestheintegeridentifierofthelastradiobuttoninthegroup.ReturnValueIDofthecheckedradiobutton,or0ifnoneisselected. (4)控件变量类型为Value时,可通过给int型变量赋值0、1、2...选中第1、2、3...个选项。int型变量默认值为-1,是在构造函数中赋的值。当然也可通过判断int型变量的值,知道哪一个选项被选中。 5、Comb

7、oBox-----------组合框控件 --类CComboBox(1)风格Simple-象ListBox一样显示数据Dropdown-可以输入,也可以选择DropList-只能选择(2)添加数据a.属性对话框->Data->Enterlistboxitems,用Ctrl+Enter换行;b.m_combo.AddString(string);c.m_combo.InsertString(index,string);(3)显示数据设计页面,点击ComboBoxControl右边的下拉箭头,显示的矩形框就是显示数据的区域。(4)设置当前选项

8、m_combo.SetCurSel(项索引);(5)获取当前选项intnIndex=m_combo.GetCurSel();CStringstr;m_combo.GetLBText(nInde

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。