CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - cstring char
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Search - cstring char - List
[
File Operate
]
ReadFile
DL : 0
打开一个TXT文件并显示在EDIT控件中 步骤: 1.新建一个基于对话框的工程,名称为ReadFile 2.在界面上添加一个按钮(IDC_BUTTON1)和一个文本编辑(IDC_EDIT1) IDC_EDIT1的属性:多行、可下拉滚动条. 3.编辑按钮触发事件(void CReadFileDlg::OnButton1()) void CReadFileDlg::OnButton1() { // TODO: Add your control notification handler code here CString sFileFilter=\"*.hex|*.hex\" CString sFileName CFileDialog fDlg(true,NULL,NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,sFileFilter,NULL) fDlg.DoModal() sFileName=fDlg.GetFileName() if(sFileName!=\"\") { CFile file(sFileName,CFile::modeRead) int nFileLength=file.GetLength() char *buffer HGLOBAL hgl=::GlobalAlloc(GMEM_MOVEABLE,nFileLength+1) buffer=(char *)::GlobalLock(hgl) file.Read(buffer,nFileLength) SetDlgItemText(IDC_EDIT1,buffer) ::GlobalUnlock(hgl) ::GlobalFree(hgl) } UpdateData(false) }
Date
: 2008-10-13
Size
: 25.48kb
User
:
这程子
[
Other resource
]
CharAndCString
DL : 0
CharAndCString,Char和CString
Date
: 2008-10-13
Size
: 31.44kb
User
:
lijunmin
[
Windows Develop
]
Char_Cstring_TCHAR
DL : 0
Visual C++ 2005中CHAR,TCHAR,CString间转换函数
Date
: 2008-10-13
Size
: 1.19kb
User
:
carl yuheng
[
VC/MFC
]
CharAndCString
DL : 0
CharAndCString,Char和CString-CharAndCString, Char and CString
Date
: 2025-07-12
Size
: 3.99mb
User
:
lijunmin
[
Windows Develop
]
Char_Cstring_TCHAR
DL : 0
Visual C++ 2005中CHAR,TCHAR,CString间转换函数-Visual C++ 2005 in CHAR, TCHAR, CString intergovernmental transfer function
Date
: 2025-07-12
Size
: 1kb
User
:
carl yuheng
[
Windows Develop
]
wchar_t
DL : 0
vc中常用数据格式转换,如wchar_t,char*,CString,int等。-vc commonly used data format conversion, such as wchar_t, char*, CString, int, etc..
Date
: 2025-07-12
Size
: 1kb
User
:
zhang lz
[
Windows Develop
]
datatype-transform
DL : 0
C++ int,char,string,CString类型转换-int,char,string,CString datatype-transform in C++
Date
: 2025-07-12
Size
: 1kb
User
:
sjunme
[
Windows Develop
]
ASCIIfun
DL : 0
这是本人根据某个项目写的数据转换辅助函数:包括ASCII转CString\char或反过程,以及数的求模等-This is why I write under a project data conversion support functions include: ASCII transfer CString \ char or anti-process, and seek the number of molds for
Date
: 2025-07-12
Size
: 1.85mb
User
:
谢仙圣
[
matlab
]
char2CString
DL : 0
char和CString之间赋值的问题,包含char* 转化成 CString,CString 转化成 char* ,BSTR 型转化成 CString 型等等。-between the char and CString assignment problem with char* into a CString, CString into a char*, BSTR type into CString type and so on.
Date
: 2025-07-12
Size
: 15kb
User
:
lizhiqian
[
VC/MFC
]
Cstring
DL : 3
字符串操作是一个不小的主题,在标准C++中,string字符串类成为一个标准,之所以抛弃char*的字符串而选用C++标准程序库中的string类,是因为他和前者比较起来,不必担心内存是否足够、字符串长度等等,而且作为一个类出现,他集成的操作函数足以完成我们大多数情况下的需要. 下面我们首先从一些示例开始学习下string类的使用.-i nclude <string> #i nclude <iostream> using namespace std void main() {
Date
: 2025-07-12
Size
: 2kb
User
:
qiannuo
[
VC/MFC
]
VCprog
DL : 0
VC编程技巧大会总 1、VC++常用数据类型(1) 一.VC常用数据类型列表 二.常用数据类型转化 2.1 数学类型变量与字符串相互转换 2.2 CString 及 string,char *与其他数据类型的转换和操作 ●CString,string,char*的综合比较 ●数学类型与 CString 相互转化 ●CString与 char*相互转换举例 ●CString 与 BSTR 型转换 ●VARIANT 型转化成 CString 型 2.3 BSTR、_bstr_t 与 CComBSTR 2.4 VARIANT 、_variant_t 与 COleVariant 附录 CString 及字符串转及操作详解 参考书籍:CSDN,<<MFC深入浅出(Second Edit)>> 一.VC常用数据类型列表 -VC编程技巧大会总 1、VC++常用数据类型(1) 一.VC常用数据类型列表 二.常用数据类型转化 2.1 数学类型变量与字符串相互转换 2.2 CString 及 string,char*与其他数据类型的转换和操作 ●CString,string,char*的综合比较 ●数学类型与 CString 相互转化 ●CString与 char*相互转换举例 ●CString 与 BSTR 型转换 ●VARIANT 型转化成 CString 型 2.3 BSTR、_bstr_t 与 CComBSTR 2.4 VARIANT 、_variant_t 与 COleVariant 附录 CString 及字符串转及操作详解 参考书籍:CSDN,<<MFC深入浅出(Second Edit)>> 一.VC常用数据类型列表
Date
: 2025-07-12
Size
: 96kb
User
:
郑梅
[
Windows Develop
]
CString-int-string-char
DL : 0
str ()的简单实现 strstr(s1,s2)是一个经常用的函数,他的作用就是在字符串s1中寻找字符串s2如果找到了就返回指针,否则返回NULL。- static const char* _strstr(const char* s1, const char* s2) { assert(s2 && s1) const char* p=s1,*r=s2 while(*p!= \0 ) { while(*p++==*r++) if(*r== \0 ) return p else { r=s2 p=++s1 } } return NULL }
Date
: 2025-07-12
Size
: 3kb
User
:
qddqdd
[
File Operate
]
cstring-Transform
DL : 0
CString,float,int,long,String,char *,char[],之间的转换-CString, float, int, long, String, char, char*, char [], the conversion between
Date
: 2025-07-12
Size
: 3kb
User
:
陈伟源
[
Windows Develop
]
CString-const-char-char-to-WCHAR
DL : 0
UNICODE下宽字符的CString转换为const char 和char到WCHAR的相互转换-Under the wide character UNICODE CString convert to WCHAR const char and char conversion between
Date
: 2025-07-12
Size
: 2kb
User
:
hillriver
[
Other
]
CString
DL : 0
本字符串类可以直接用 , =,[],==操作符,并可在需要时直接转化为char*类型,程序把cpy(char*)及cat(char*)函数放在protected节中,方便在扩展本类时,进行继承并简化使用-The string class can be used directly++ =, [], the == operator, and may need to translate directly into char* type, the program cpy (char*) and cat (char*) function on the protected section to facilitate the expansion of the class, inherit and to simplify the use of
Date
: 2025-07-12
Size
: 1kb
User
:
zhaobin
[
OS program
]
CStringTest
DL : 0
本程序实现了CString、char*之间的转换,是适合初学者的很好的学习材料。-This program implements the conversion between CString char* is a good learning material for beginners.
Date
: 2025-07-12
Size
: 1.8mb
User
:
chenjun
[
Other
]
Cstring-transition-char-string-int
DL : 0
Cstring转char、string、int等数据类型的方法,这是我们VC编程经常用到的方法,希望对大家有用!-The transfected char, string, int data type in Cstring. Txt
Date
: 2025-07-12
Size
: 2kb
User
:
黄德才
[
VC/MFC
]
CString-AND-LPCWSTR
DL : 0
CString与LPCWSTR、LPSTR、char*、LPWSTR等类型的转换-CString and LPCWSTR, LPSTR, char*, LPWSTR other type of conversion
Date
: 2025-07-12
Size
: 5kb
User
:
刘文
[
Windows Develop
]
CString-const-char-char-to-WCHAR
DL : 0
UNICODE下宽字符的CString转换为const char 和char到WCHAR的相互转换-Under the wide character UNICODE CString convert to WCHAR const char and char conversion between
Date
: 2025-07-12
Size
: 2kb
User
:
questionab
[
VC/MFC
]
CString-to-char(Unicode)
DL : 0
Unicode下CString与char_转换-Unicode CString and char_ conversion under
Date
: 2025-07-12
Size
: 14kb
User
:
jockey
«
1
2
3
»
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.