falla.zhang

导航

2010年2月21日 #

MFC 问题集(8)CString/string/char *比较详解

摘要: (一) 概述string和CString均是字符串模板类,string为标准模板类(STL)定义的字符串类,已经纳入C++标准之中;CString(typedef CStringT> CString)为Visual C++中最常用的字符串类,继承自CSimpleStringT类,主要应用在MFC和ATL编程中,主要数据类型有char(应用于ANSI), wchar_t(unicode),T... 阅读全文

posted @ 2010-02-21 16:05 falla.zhang 阅读(661) 评论(0) 推荐(0) 编辑

MFC 问题集(5)单选按钮进行分组

摘要: 对单选按钮进行分组: 每组的第一个单选按钮设置属性:Group,Tabstop,Auto;其余按钮设置属性Tabstop,Auto。如:Radio1、Radio2、Radio3为一组,Radio4、Radio5为一组设定Radio1属性:Group,Tabstop,Auto设定Radio2属性:Tabstop,Auto设定Radio3属性:Tabstop,Auto设定Radio4属性:Group,... 阅读全文

posted @ 2010-02-21 16:04 falla.zhang 阅读(532) 评论(0) 推荐(0) 编辑

MFC 问题集(6)CString&int互转

摘要: VC++6.0 CString转int int转CString CString _temp = "100"; int _int; _int = atoi(_temp); =================================== CString str; int i = 2334; str.Format("%d",i); 阅读全文

posted @ 2010-02-21 16:04 falla.zhang 阅读(157) 评论(0) 推荐(0) 编辑

MFC 问题集(7)注意变量的作用域

摘要: CString lastZZHS ;if(int index=m_ListCtrl.GetItemCount()-1){ lastZZHS = m_ListCtrl.GetItemText(index,3); AfxMessageBox(lastZZHS); }//正常显示 if(int lastindex =(m_ListCtrl.GetItemCount()-1){ CString last... 阅读全文

posted @ 2010-02-21 16:04 falla.zhang 阅读(276) 评论(0) 推荐(0) 编辑