高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】该死的unicode
该死的unicode
该死的unicode
请教如何将一 ads_real类型实数转化为achar*类型,以便在图形中输出。
例如,我要在图形中插入“壁厚xmm”说明语句。其中x为ads_real型实数的值。请教高手如何实现。
说明:俺的程序没有基于mfc,cstring类不能用。
acutprintf(_t("壁厚%lfmm"),x);
是不是?
多谢,如果要acedalert()函数,或者用acdbtext的settextstring函数呢
extern "c" int
acedalert(
const achar * str);
strmessage to display (maximum of 132 characters with the 133rd slot reserved as the end-of-string character)
__________________________________________________________
acad::errorstatus
settextstring(
const achar* unnamed);
unnamedinput null-terminated text string (256 byte max)
__________________________________________________________
两个应该和上面那个一样。只要加个_t("")就行了吧。
我也是菜鸟,自己想的,呵呵。
“multibytetowidechar和widechartomultibyte用法详解”
将实数转化为字符的方法用标准的c语言函数,sprintf(stemp,"%0.2f",val);
然后在需要输入文字的地方用stemp代替即可.
|