社区
非技术类
帖子详情
简单的CString问题,如何显示ASCII 127以上的字符
jimmey
2002-03-28 08:33:30
FOR example
CString tmp;
tmp.Format("%c",129);
AfxMessageBox(tmp);
跳出的messagebox 显示的是 ?,很明显是错的
请各位赐教
...全文
59
10
打赏
收藏
简单的CString问题,如何显示ASCII 127以上的字符
FOR example CString tmp; tmp.Format("%c",129); AfxMessageBox(tmp); 跳出的messagebox 显示的是 ?,很明显是错的 请各位赐教
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
10 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
delphihero
2002-04-13
打赏
举报
回复
CString tmp;
TCHAR x;
int y=129;
x=y;
tmp+=x;
AfxMessageBox(tmp);
试试看吧,不一定能有东西.因为有些位置就是空的。而汉字相当于两个 char 字符。unicode 中大小都一样。
jimmey
2002-04-03
打赏
举报
回复
push
jimmey
2002-04-02
打赏
举报
回复
还有建议吗
oyf888
2002-03-29
打赏
举报
回复
我考KAO,他们给你指歪了,应该是代码页和符集的问题,你设置对了就好了,否则就会是汉字了,因为汉字用了128以上的,请设置代码页为1252试一下。
jimmey
2002-03-29
打赏
举报
回复
还有什么有建设性的建议吗?
sunshine_shen
2002-03-29
打赏
举报
回复
不可见的字符,是不能显示的
eggaig
2002-03-28
打赏
举报
回复
127以上的作为汉字(一半)来显示的!!
要显示那就自己画啦!!!
skywolfY
2002-03-28
打赏
举报
回复
显示不出来怎么显示?
天地大美
2002-03-28
打赏
举报
回复
union
{
unsigned char c;
int d;
}dc;
dc.d=129;
printf("%c",dc.c);
delphihero
2002-03-28
打赏
举报
回复
改为"%d"试试
C++
字符
串转换
字符
串转换: C
String
,int,
string
,char*之间的转换 ;
rust-
ascii
:
ASCII
等同于`char`,`str`和`
String
`
ASCII
一个提供仅
ASCII
字符
串和
字符
类型的库,等效于标准库中的char , str和
String
类型。 类型和转换特性在进行了描述。 您可以通过将其添加到Cargo.toml的dependencies部分中,将其添加到您的货运项目中: [ dependencies ]
ascii
= " 1.0 " 在没有libstd的情况下使用
ascii
通过禁用默认功能,可以在不使用std的情况下使用大多数
Ascii
Char和
Ascii
Str 。 所拥有的
字符
串类型
Ascii
String
和转换特征Into
Ascii
String
以及所有涉及到这些类型的方法,可以通过启用重新启用alloc功能。 引用CStr和C
String
方法也不可用。 Error特征也仅存在于std ,但在#![no_std] -mode中, description()作为To
Ascii
CharError和AsAs
C++
字符
串完全指南.doc
第一部分
字符
串基础部分 2 1.1. 前言 2 1.2.
字符
串基础 -
ASCII
, DBCS, Unicode 2 1.3.
字符
串的存储 3 1.4.
字符
串处理函数 3 1.5. C
字符
串函数大全 3 1.6.
字符
串遍历 7 1.7. 再谈strxxx() 与_mbsxxx() 8 1.8. Win32 API中的MBCS 和 Unicode的二种
字符
集 9 1.9.
String
和 TCHAR 类型定义 10 1.10. 何时使用TCHAR 和Unicode 11 第二部分 各种
字符
串类部分 12 2.1. 前言 12 2.2. C语言
字符
串与类型定义 12 2.3. COM中的
字符
串 - BSTR 与 VARIANT 14 2.4.
字符
串包装类 15 2.4.1. CRT类 _bstr_t 15 2.4.2. _variant_t 15 2.4.3. STL类 16 2.4.4. ATL类 CComBSTR 16 2.4.5. ATL类CComVariant 17 2.4.6. ATL转换宏 17 2.4.7. MFC类 C
String
18 2.4.8. WTL类 C
String
19 2.4.9. CLR 及 VC 7 类 19 2.4.10.
字符
串类的打印格式函数 20 2.4.11. 所有类的总结 20
Super
string
库
字符
转的各种转换函数库,用这个库,
字符
串的各种转换再也不头疼 //-------------
字符
串转数字-------------- int C
String
_numberStr_2_int(C
String
str); int std
String
_2_int(std::
string
str);//std
string
字符
串转int int std_hex
String
_2_int(std::
string
str);//std
string
字符
串转int double C
String
_2_double(C
String
in); double std
String
_2_double(std::
string
str);//std
string
字符
串转double unsigned int hex
String
_2_u32(std::
string
str); //-------------数字转
字符
串-------------- C
String
C
String
_int_2_numberStr(int n); C
String
C
String
_int_2_numberStr6(int n); std::
string
std
String
_int_2_numberStr(int a); C
String
double_2_number_C
String
(double n); std::
string
double_2_number_
String
(double a); C
String
GetCurrWorkingDir(); //获得当前工作路径,不含最后一个
字符
“\” C
String
ascii
_2_c
string
(int
ascii
);// 把
ascii
字符
转换成对应的
字符
,返回c
string
类型 //-------------
字符
串转
字符
串-------------- std::
string
C
String
_2_std
String
(C
String
str); C
String
std
String
_2_C
String
(std::
string
str); void C
String
_2_charP(C
String
str,char *q); //c
string
change to ansi
string
//-------------判断
字符
串类型-------------- bool is_a_double_type_
string
(C
String
str); //-------------
字符
串复杂操作-------------- int break_
string
(std::
string
instr, std::
string
subStr, vector
string>* subs); //以subStr为标记切割instr为多个单词,存储于subs std::
string
super_C
String
::getTime
String
(bool fgf);//获得表示当前时间的
字符
串,fgf表示是否需要分隔符 std::
string
super_C
String
::getDateTime
String
(bool fgf);//获得表示当前时间和日期的
字符
串,fgf表示是否需要分隔符 std::
string
getDate
String
(bool fgf); //获得表示当前日期的
字符
串,fgf表示是否需要分隔符 std::
string
string
_trim_LR_space(std::
string
str);//去除
字符
串前后的空白
字符
std::
string
string
_trim_L_space(std::
string
str);//去除
字符
串左边的空白
字符
std::
string
string
_trim_R_space(std::
string
str);//去除
字符
串右边的空白
字符
//-------------GUI相关-------------- C
String
get_CEdit_text(CEdit* edit); //-------------文件、路径相关-------------- C
String
calc_CurrWorkingDir_filename(C
String
str);//返回程序运行的当前路径+filename C
String
calc_work_full_filename(C
String
filename,C
String
path);//path为路径,如果path为空返回程序运行的当前路径+filename,否则返回path+filename。 std::
string
GetCurrWorkingDir_std
String
(); std::
string
calc_CurrWorkingDir_filename(std::
string
str); std::
string
calc_work_full_filename(std::
string
filename,std::
string
path);
汉字点阵生成源码 两种方式生成 适合新手学习
本例题采用两种方式列举了汉字取模方法,并用图像生动的
显示
出来,可以说是新手学习的好例题。 1.以16点阵汉字取模方式 通过定位读取 HZK16 文件(源码内附带这个文件,可以不用下载了)方式,详细说明实现方法。 2.通过GetGlyphOutline这个函数实现,用户可以手动选择Windows自带的字体,然后根据字体生成相应的数组,最后绘制数组
显示
。 以上源码楼主测试,在VC6.0下完全通过,可直接运行。 以上代码仍有很多不足之处,请大家留言指正哈. 关键代码: BOOL CPixFontTranDlg::GetGridFromHZK16(C
String
strFont,BYTE buffer[]) { ... AnsiCode[0]=strFont.GetAt(0); if(AnsiCode[0]GetSafeHdc(),chartemp,GGO_BITMAP,&glpm,0,NULL,&mmat2); //根据MSDN,cbBuffer 传入参数0,则返回值是BUFFER的大小 if((signed)nLen>0) { .... nLentemp=::GetGlyphOutline(pdc->GetSafeHdc(),chartemp,GGO_BITMAP,&glpm,nLen,pBuf,&mmat2);//重新运行,获取BUFFER的数据,pBUF就是
字符
对应位图的BUFFER指针 } ... offset=8-rows/2; //从点阵第一行到字的第一行的偏移量 for(i=0;i
非技术类
1,649
社区成员
59,013
社区内容
发帖
与我相关
我的任务
非技术类
VC/MFC 非技术类
复制链接
扫一扫
分享
社区描述
VC/MFC 非技术类
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章