请教关于VC中的各种数据类型的说明

wyj1974 2003-10-20 11:15:25
例如:BTSR、LPSTR等等。。。
...全文
55 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
apcad 2003-10-20
  • 打赏
  • 举报
回复
以下摘自:侯捷<深入浅出MFC>

MFC和WIN32(SDK程序)共同使用的数据类型
数据类型 意义/定义
BOOL Boolean值(布尔值,不是TRUE,就是FALSE)
BSTR 32-bit字符指针
BYTE 8-bit整数,未带正负号
COLORREF 32-bit数值,代表一个颜色值
DWORD 32-bit整数,未带正负号
LONG 32-bit整数,带正负号
LPARAM 32-bit数值,作为窗口函数或CALLBACK函数的一个参数
LPCSTR 32-bit指针,指向一个常数字符串
LPSTR 32-bit指针,指向一个字符串
LPCTSTR 32-bit指针,指向一个常数字符串,此字符串可以移植到Unicode和DBMS(双字节字集)
LPTSTR 32-bit指针,指向一个字符串,此字符串可以移植到Unicode和DBMS(双字节字集)
LPVOID 32-bit指针,指向一个未指定类型的数据
LPRESULT 32-bit数值,作为窗口函数或callback函数的返回值
UINT 在Win16种是一个16-bit未带正负号整数,在win32中是一个32-bit未带正负号整数
WNDPROC 32-bit指针,指向一个窗口函数
WORD 16-bit整数,未带正负号
WPARAM 窗口函数的callback函数的一个参数。在Win16中是16-bits,在win32中是32-bits

MFC独特的数据类型
数据类型 意义/定义
POSITION 一个数值,代表COLLECTION对象(数组或链表)中的元素位置。常使用于MFC collection classes
LPCRECT 32-bit指针,指向一个不变的RECT结构
beyondtkl 2003-10-20
  • 打赏
  • 举报
回复
这些数据格式英文也不难丫,
也可以开个词霸的
其实 数据格式也不是用记的 多用就熟悉了
wyj1974 2003-10-20
  • 打赏
  • 举报
回复
有没有中文说明
vcforever 2003-10-20
  • 打赏
  • 举报
回复
同意楼上,在MSDN中都有说明,而且很全!
也就是楼上两位列出来的!
xieweibbs 2003-10-20
  • 打赏
  • 举报
回复
同意楼上几位。
hanwg 2003-10-20
  • 打赏
  • 举报
回复
BOOL A Boolean value.


BSTR A 32-bit character pointer.


BYTE An 8-bit integer that is not signed.


COLORREF A 32-bit value used as a color value.


DWORD A 32-bit unsigned integer or the address of a segment and its associated offset.


LONG A 32-bit signed integer.


LPARAM A 32-bit value passed as a parameter to a window procedure or callback function.


LPCSTR A 32-bit pointer to a constant character string.


LPSTR A 32-bit pointer to a character string.


LPCTSTR A 32-bit pointer to a constant character string that is portable for Unicode and DBCS.


LPTSTR A 32-bit pointer to a character string that is portable for Unicode and DBCS.


LPVOID A 32-bit pointer to an unspecified type.


LRESULT A 32-bit value returned from a window procedure or callback function.


UINT A 16-bit unsigned integer on Windows versions 3.0 and 3.1; a 32-bit unsigned integer on Win32.


WNDPROC A 32-bit pointer to a window procedure.


WORD A 16-bit unsigned integer.


WPARAM A value passed as a parameter to a window procedure or callback function: 16 bits on Windows versions 3.0 and 3.1; 32 bits on Win32.

POSITION A value used to denote the position of an element in a collection; used by MFC collection classes.


LPCRECT A 32-bit pointer to a constant (nonmodifiable) RECT structure.
flyelf 2003-10-20
  • 打赏
  • 举报
回复
from msdn:
Data Types
This topic lists the data types most commonly used in the Microsoft Foundation Class Library. Most of the data types are exactly the same as those in the Windows Software Development Kit (SDK), while others are unique to MFC.

Commonly used Windows SDK and MFC data types are as follows:

BOOL A Boolean value.


BSTR A 32-bit character pointer.


BYTE An 8-bit integer that is not signed.


COLORREF A 32-bit value used as a color value.


DWORD A 32-bit unsigned integer or the address of a segment and its associated offset.


LONG A 32-bit signed integer.


LPARAM A 32-bit value passed as a parameter to a window procedure or callback function.


LPCSTR A 32-bit pointer to a constant character string.


LPSTR A 32-bit pointer to a character string.


LPCTSTR A 32-bit pointer to a constant character string that is portable for Unicode and DBCS.


LPTSTR A 32-bit pointer to a character string that is portable for Unicode and DBCS.


LPVOID A 32-bit pointer to an unspecified type.


LRESULT A 32-bit value returned from a window procedure or callback function.


UINT A 16-bit unsigned integer on Windows versions 3.0 and 3.1; a 32-bit unsigned integer on Win32.


WNDPROC A 32-bit pointer to a window procedure.


WORD A 16-bit unsigned integer.


WPARAM A value passed as a parameter to a window procedure or callback function: 16 bits on Windows versions 3.0 and 3.1; 32 bits on Win32.
Data types unique to the Microsoft Foundation Class Library include the following:

POSITION A value used to denote the position of an element in a collection; used by MFC collection classes.


LPCRECT A 32-bit pointer to a constant (nonmodifiable) RECT structure
icr_mio 2003-10-20
  • 打赏
  • 举报
回复
你在MSDN的索引中输入data type,会列出一堆关于数据类型的说明!

16,471

社区成员

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

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

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