有谁能对VC中的数据类型(如DWORD等)做一个总结吗?如果好,一百分致谢!

zcwhgj 2003-12-25 12:48:41
如题。
...全文
1495 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
richie_cn 2003-12-28
  • 打赏
  • 举报
回复
从研格意义上来说,只有位啊!所有的数据类型都是从位开始的哦!
wangzi163 2003-12-28
  • 打赏
  • 举报
回复
dword 是一个笼统的数据类型
ckp 2003-12-28
  • 打赏
  • 举报
回复
MSDN中的资料:
basic data type:
boolean unsigned 8-bit data item
byte - (not applicable) 8-bit data item
char unsigned 8-bit unsigned data item
double - 64-bit floating-point number
float - 32-bit floating-point number
handle_t - Primitive handle type
hyper signed 64-bit signed integer
int signed 32-bit signed integer
long signed 32-bit signed integer
short signed 16-bit signed integer
small signed 8-bit signed integer
void * - 32-bit context handle pointer type
wchar_t unsigned 16-bit unsigned data item
又,楼上的兄弟说得完全正确,Windows 2K是32位的操作系统,地址当然是dword了;
再,三楼的兄弟,为什么没有int24,^__^,如果你学过汇编,你就因该知道,再汇编中,基本的整型数据类型就只有:
byte 一个字节;
word 两个字节,即一个字;
dword 四个字节,即一个双字;
C是与汇编紧密相连的,所以不会存在int24这样的整型数。
mogo 2003-12-28
  • 打赏
  • 举报
回复
就请fbm解释一下吧
handpoint 2003-12-28
  • 打赏
  • 举报
回复
"所有的类型都是一种类型,就是dword"
是说指向数据的指针吗?不管什么数据
它们在内存中的地址都是一个DWORD,
好象学汇编的时候书中有说所有的参数
在传递时其实就是一个DWORD,不知道对
不对?
fbmsf 2003-12-26
  • 打赏
  • 举报
回复
在我的眼中,所有的类型都是一种类型,就是dword。
有多少人明白?
EricTangHL 2003-12-26
  • 打赏
  • 举报
回复
如果有3个字节长的in24就好了
zcwhgj 2003-12-26
  • 打赏
  • 举报
回复
很好的!
如果能有一定的中文注释就更好了。
abrams 2003-12-25
  • 打赏
  • 举报
回复
unsigned long 4 unsigned long int 0 to 4,294,967,295
eastred 2003-12-25
  • 打赏
  • 举报
回复
MSDN上有啊~
ATOM Atom. For more information, see Atoms.
BOOL Boolean variable (should be TRUE or FALSE).
BOOLEAN Boolean variable (should be TRUE or FALSE).
BYTE Byte (8 bits).
CALLBACK Calling convention for callback functions.
CHAR 8-bit Windows (ANSI) character. For more information, see Character Sets Used By Fonts.
COLORREF Red, green, blue (RGB) color value (32 bits). See COLORREF for information on this type.
CONST Variable whose value is to remain constant during execution.
CRITICAL_SECTION Critical-section object. For more information, see Critical Section Objects.
DWORD 32-bit unsigned integer.
DWORD_PTR Unsigned long type for pointer precision. Use when casting a pointer to a long type to perform pointer arithmetic. (Also commonly used for general 32-bit parameters that have been extended to 64 bits in 64-bit Windows. )
DWORD32 32-bit unsigned integer.
DWORD64 64-bit unsigned integer.
FLOAT Floating-point variable.
HACCEL Handle to an accelerator table.
HANDLE Handle to an object.
HBITMAP Handle to a bitmap.
HBRUSH Handle to a brush.
HCONV Handle to a dynamic data exchange (DDE) conversation.
HCONVLIST Handle to a DDE conversation list.
HCURSOR Handle to a cursor.
HDC Handle to a device context (DC).
HDDEDATA Handle to DDE data.
HDESK Handle to a desktop.
HDROP Handle to an internal drop structure.
HDWP Handle to a deferred window position structure.
HENHMETAFILE Handle to an enhanced metafile.
HFILE Handle to a file opened by OpenFile, not CreateFile.
HFONT Handle to a font.
HGDIOBJ Handle to a GDI object.
HGLOBAL Handle to a global memory block.
HHOOK Handle to a hook.
HICON Handle to an icon.
HIMAGELIST Handle to an image list.
HIMC Handle to input context.
HINSTANCE Handle to an instance.
HKEY Handle to a registry key.
HKL Input locale identifier.
HLOCAL Handle to a local memory block.
HMENU Handle to a menu.
HMETAFILE Handle to a metafile.
HMODULE Handle to a module. The value is the base address of the module.
HMONITOR Handle to a display monitor.
HPALETTE Handle to a palette.
HPEN Handle to a pen.
HRGN Handle to a region.
HRSRC Handle to a resource.
HSZ Handle to a DDE string.
HWINSTA Handle to a window station.
HWND Handle to a window.
INT 32-bit signed integer.
INT_PTR Signed integral type for pointer precision. Use when casting a pointer to an integer to perform pointer arithmetic.
INT32 32-bit signed integer.
INT64 64-bit signed integer.
LANGID Language identifier. For more information, see Locales.
LCID Locale identifier. For more information, see Locales.
LCTYPE Locale information type. For a list, see Locale and Language Information.
LONG 32-bit signed integer.
LONG_PTR Signed long type for pointer precision. Use when casting a pointer to a long to perform pointer arithmetic.
LONG32 32-bit signed integer.
LONG64 64-bit signed integer.
LONGLONG 64-bit signed integer.
LPARAM Message parameter.
LPBOOL Pointer to a BOOL.
LPBYTE Pointer to a BYTE.
LPCOLORREF Pointer to a COLORREF value.
LPCRITICAL_SECTION Pointer to a CRITICAL_SECTION.
LPCSTR Pointer to a constant null-terminated string of 8-bit Windows (ANSI) characters. For more information, see Character Sets Used By Fonts.
LPCTSTR An LPCWSTR if UNICODE is defined, an LPCTSTR otherwise.
LPCVOID Pointer to a constant of any type.
LPCWSTR Pointer to a constant null-terminated string of 16-bit Unicode characters. For more information, see Character Sets Used By Fonts.
LPDWORD Pointer to a DWORD.
LPHANDLE Pointer to a HANDLE.
LPINT Pointer to an INT.
LPLONG Pointer to a LONG.
LPSTR Pointer to a null-terminated string of 8-bit Windows (ANSI) characters. For more information, see Character Sets Used By Fonts.
LPTSTR An LPWSTR if UNICODE is defined, an LPSTR otherwise.
LPVOID Pointer to any type.
LPWORD Pointer to a WORD.
LPWSTR Pointer to a null-terminated string of 16-bit Unicode characters. For more information, see Character Sets Used By Fonts.
LRESULT Signed result of message processing.
LUID Locally unique identifier.
PBOOL Pointer to a BOOL.
PBOOLEAN Pointer to a BOOL.
PBYTE Pointer to a BYTE.
PCHAR Pointer to a CHAR.
PCRITICAL_SECTION Pointer to a CRITICAL_SECTION.
PCSTR Pointer to a constant null-terminated string of 8-bit Windows (ANSI) characters. For more information, see Character Sets Used By Fonts.
PCTSTR A PCWSTR if UNICODE is defined, a PCSTR otherwise.
PCWCH Pointer to a constant WCHAR.
PCWSTR Pointer to a constant null-terminated string of 16-bit Unicode characters. For more information, see Character Sets Used By Fonts.
PDWORD Pointer to a DWORD.
PFLOAT Pointer to a FLOAT.
PHANDLE Pointer to a HANDLE.
PHKEY Pointer to an HKEY.
PINT Pointer to an INT.
PLCID Pointer to an LCID.
PLONG Pointer to a LONG.
PLUID Pointer to a LUID.
POINTER_32 32-bit pointer. On a 32-bit system, this is a native pointer. On a 64-bit system, this is a truncated 64-bit pointer.
POINTER_64 64-bit pointer. On a 64-bit system, this is a native pointer. On a 32-bit system, this is a sign-extended 32-bit pointer.
PSHORT Pointer to a SHORT.
PSTR Pointer to a null-terminated string of 8-bit Windows (ANSI) characters. For more information, see Character Sets Used By Fonts.
PTBYTE Pointer to a TBYTE.
PTCHAR Pointer to a TCHAR.
PTSTR PWSTR if UNICODE is defined, a PSTR otherwise.
PTBYTE Pointer to a TBYTE.
PTCHAR Pointer to a TCHAR.
PTSTR A PWSTR if UNICODE is defined, a PSTR otherwise.
PUCHAR Pointer to a UCHAR.
PUINT Pointer to a UINT.
PULONG Pointer to a ULONG.
PUSHORT Pointer to a USHORT.
PVOID Pointer to any type.
PWCHAR Pointer to a WCHAR.
PWORD Pointer to a WORD.
PWSTR Pointer to a null-terminated string of 16-bit Unicode characters. For more information, see Character Sets Used By Fonts.
REGSAM Security access mask for registry key.
SC_HANDLE Handle to a service control manager database. For more information, see SCM Handles.
SC_LOCK Handle to a service control manager database lock. For more information, see SCM Handles.
SERVICE_STATUS_HANDLE Handle to a service status value. For more information, see SCM Handles.
SHORT Short integer (16 bits).
SIZE_T The maximum number of bytes to which a pointer can point. Use for a count that must span the full range of a pointer.
SSIZE_ T Signed SIZE_T.
TBYTE A WCHAR if UNICODE is defined, a CHAR otherwise.
TCHAR A WCHAR if UNICODE is defined, a CHAR otherwise.
UCHAR Unsigned CHAR.
UINT Unsigned INT.
UINT_PTR Unsigned INT_PTR.
UINT32 Unsigned INT32.
UINT64 Unsigned INT64.
ULONG Unsigned LONG.
ULONG_PTR Unsigned LONG_PTR.
ULONG32 Unsigned LONG32.
ULONG64 Unsigned LONG64.
ULONGLONG 64-bit unsigned integer.
UNSIGNED Unsigned attribute.
USHORT Unsigned SHORT.
VOID Any type.
WCHAR 16-bit Unicode character. For more information, see Character Sets Used By Fonts.
WINAPI Calling convention for system functions.
WORD 16-bit unsigned integer.
WPARAM Message parameter.
abrams 2003-12-25
  • 打赏
  • 举报
回复
typedef unsigned long DWORD
topwork 2003-12-25
  • 打赏
  • 举报
回复
下面是头文件里面考出来的(借花献佛,不用给我分):
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef unsigned int UINT;
typedef int INT;
typedef long BOOL;
typedef long LONG;
typedef UINT WPARAM;
typedef unsigned long DWORD;
typedef LONG LPARAM;
typedef LONG LRESULT;
typedef void __RPC_FAR *HANDLE;
typedef void __RPC_FAR *HMODULE;
typedef void __RPC_FAR *HINSTANCE;
typedef void __RPC_FAR *HRGN;
typedef void __RPC_FAR *HTASK;
typedef void __RPC_FAR *HKEY;
typedef void __RPC_FAR *HDESK;
typedef void __RPC_FAR *HMF;
typedef void __RPC_FAR *HEMF;
typedef void __RPC_FAR *HPEN;
typedef void __RPC_FAR *HRSRC;
typedef void __RPC_FAR *HSTR;
typedef void __RPC_FAR *HWINSTA;
typedef void __RPC_FAR *HKL;
typedef void __RPC_FAR *HGDIOBJ;
typedef HANDLE HDWP;
typedef INT HFILE;
typedef WORD __RPC_FAR *LPWORD;
typedef DWORD __RPC_FAR *LPDWORD;
typedef char CHAR;
typedef CHAR __RPC_FAR *LPSTR;
typedef const CHAR __RPC_FAR *LPCSTR;
typedef wchar_t WCHAR;
typedef WCHAR TCHAR;
typedef WCHAR __RPC_FAR *LPWSTR;
typedef TCHAR __RPC_FAR *LPTSTR;
typedef const WCHAR __RPC_FAR *LPCWSTR;
typedef const TCHAR __RPC_FAR *LPCTSTR;
typedef char OLECHAR;
typedef LPSTR LPOLESTR;
typedef LPCSTR LPCOLESTR;
typedef const RECTL __RPC_FAR *LPCRECTL;
typedef void __RPC_FAR *PVOID;
typedef void __RPC_FAR *LPVOID;
typedef float FLOAT;
typedef unsigned char UCHAR;
typedef short SHORT;
typedef unsigned short USHORT;
typedef DWORD ULONG;
typedef double DOUBLE;
typedef MIDL_uhyper DWORDLONG;
typedef DWORDLONG __RPC_FAR *PDWORDLONG;
typedef hyper LONGLONG;
typedef MIDL_uhyper ULONGLONG;
typedef LONGLONG __RPC_FAR *PLONGLONG;
typedef ULONGLONG __RPC_FAR *PULONGLONG;
typedef USHORT SECURITY_DESCRIPTOR_CONTROL;
typedef USHORT __RPC_FAR *PSECURITY_DESCRIPTOR_CONTROL;
typedef PVOID PSID;
typedef ACL __RPC_FAR *PACL;
typedef LONG SCODE;
typedef LONG HRESULT;
typedef SCODE __RPC_FAR *PSCODE;
typedef /* [unique] */ RemotableHandle __RPC_FAR *wireHWND;
typedef /* [unique] */ RemotableHandle __RPC_FAR *wireHMENU;
typedef /* [unique] */ RemotableHandle __RPC_FAR *wireHACCEL;
typedef /* [unique] */ RemotableHandle __RPC_FAR *wireHBRUSH;
typedef /* [unique] */ RemotableHandle __RPC_FAR *wireHFONT;
typedef /* [unique] */ RemotableHandle __RPC_FAR *wireHDC;
typedef /* [unique] */ RemotableHandle __RPC_FAR *wireHICON;
typedef /* [wire_marshal] */ void __RPC_FAR *HWND;
typedef /* [wire_marshal] */ void __RPC_FAR *HMENU;
typedef /* [wire_marshal] */ void __RPC_FAR *HACCEL;
typedef /* [wire_marshal] */ void __RPC_FAR *HBRUSH;
typedef /* [wire_marshal] */ void __RPC_FAR *HFONT;
typedef /* [wire_marshal] */ void __RPC_FAR *HDC;
typedef /* [wire_marshal] */ void __RPC_FAR *HICON;
typedef /* [unique] */ userHBITMAP __RPC_FAR *wireHBITMAP;
typedef /* [unique] */ userHPALETTE __RPC_FAR *wireHPALETTE;
typedef /* [unique] */ userHENHMETAFILE __RPC_FAR *wireHENHMETAFILE;
typedef /* [unique] */ userHMETAFILE __RPC_FAR *wireHMETAFILE;
typedef /* [unique] */ userHMETAFILEPICT __RPC_FAR *wireHMETAFILEPICT;
typedef /* [wire_marshal] */ void __RPC_FAR *HGLOBAL;
typedef HGLOBAL HLOCAL;
typedef /* [wire_marshal] */ void __RPC_FAR *HBITMAP;
typedef /* [wire_marshal] */ void __RPC_FAR *HPALETTE;
typedef /* [wire_marshal] */ void __RPC_FAR *HENHMETAFILE;
typedef /* [wire_marshal] */ void __RPC_FAR *HMETAFILE;
typedef /* [wire_marshal] */ void __RPC_FAR *HMETAFILEPICT;

16,466

社区成员

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

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

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