求TEXT函数的详细说明,最好有例子。外语的亦可。

pcgenius 2003-11-06 03:59:02
我没MSDN,你粘贴的也可以。
...全文
108 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
bluebohe 2003-11-06
  • 打赏
  • 举报
回复

Platform SDK: International Features

TEXT
The TEXT macro identifies a string as Unicode when the UNICODE is defined during compilation. Otherwise, it identifies a string as an ANSI string.

TEXT(
LPTSTR string // ANSI or Unicode string
);
Parameters
string
Pointer to the string to be interpreted as either Unicode or ANSI.
Requirements
Windows NT/2000/XP: Included in Windows NT 3.1 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Winnt.h; include Windows.h.

See Also
Unicode and Character Sets Overview, Unicode and Character Set Macros
_____________________________________________________________________________
Platform SDK: Exchange Server
TEXT
The TEXT object allows the user to put a line of text on the page in a specified area. This object must always specify a VALUE property with a string that can contain one or more of the following metavariables.

Metavariable Description
&USERNAME Prints the user's name.
&CURDATE Prints the current date.
&CURTIME Prints the current time.
&PRINTDATE Prints the date for which the object is printed.
&PAGENUM Prints the page number.
&TIMEZONE Prints the current time zone.
&& Prints an ampersand (&).


The OPTIONS property, if present, requires the following parameters.

Parameter Description
HCENTER | LEFT | RIGHT Specifies the horizontal justification.
VCENTER | NONE Specifies the vertical justification.
ELLIPSIS | NONE Adds an ellipsis to the end of a string if the entire string does not fit within the described rectangle.
Multiline text prints if there is room in the rectangle, but using VCENTER on a multiline text block can produce unpredictable results.

sxslyy 2003-11-06
  • 打赏
  • 举报
回复
《windos 程序设计》第二章有详细说明。
wuxfBrave 2003-11-06
  • 打赏
  • 举报
回复
TEXT其实是一个宏
#ifdef UNICODE
#define __TEXT(quote) L##quote
#else /* UNICODE */
#define __TEXT(quote) quote
#endif /* UNICODE */
#define TEXT(quote) __TEXT(quote)

在定义了UNICODE的情况下它返回UNICODE字符串
在未定义UNICODE情况下返回ANSI字符串
saucer 2003-11-06
  • 打赏
  • 举报
回复
you mean the TEXT macro? if so, see

http://leb.net/wine/WinDoc/msdn/sdk/platforms/doc/sdk/win32/mac/src/mac04_22.htm

TEXT
The TEXT macro identifies a string as Unicode when the UNICODE compile flag is used or as an ANSI string when Unicode is not defined.

TEXT(
LPTSTR string // address of ANSI or Unicode string
);

Parameters
string
Specifies the string to be interpreted as either Unicode or ANSI.

Remarks
The TEXT macro is defined as follows:

#define TEXT(quote) L##quote

16,471

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧