几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   ObjectARX(C++) (http://www.dimcax.com/hust/forumdisplay.php?f=34)
-   -   【转帖】该死的unicode (http://www.dimcax.com/hust/showthread.php?t=8068)

yang686526 2009-04-18 07:31 PM

【转帖】该死的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代替即可.


所有的时间均为北京时间。 现在的时间是 08:11 PM.