Delphi Óë C/C++ Êý¾ÝÀàÐͶÔÕÕ±í
Delphi Óë C/C++ Êý¾ÝÀàÐͶÔÕÕ±í
DelphiÊý¾ÝÀàÐÍC/C++
ShorInt
8λÓзûºÅÕûÊý
char
Byte
8λÎÞ·ûºÅÕûÊý
BYTE,unsigned short
SmallInt
16λÓзûºÅÕûÊý
short
Word
16λÎÞ·ûºÅÕûÊý
unsigned short
Integer,LongInt
32λÓзûºÅÕûÊý
int,long
Cardinal,LongWord/DWORD
32λÎÞ·ûºÅÕûÊý
unsigned long
Int64
64λÓзûºÅÕûÊý
_int64
Single
4×Ö½Ú¸¡µãÊý
float
*Real48
6×Ö½Ú¸¡µãÊý
¡¡
Double
8×Ö½Ú¸¡µãÊý
double
*Extended
10×Ö½Ú¸¡µãÊý
long double
Currency
64λ»õ±ÒÀàÐÍ
¡¡
TDate/TDateTime
8×Ö½ÚÈÕÆÚ/ʱ¼ä
¡¡
Variant,OleVariant
16×ֽڿɱäÀàÐÍ
VARIANT,^Variant,^OleVariant
Char,AnsiChar
1×Ö½Ú×Ö·û
char
WideChar
2×Ö½Ú×Ö·û
WCHAR
*ShortString
¶Ì×Ö·û´®
¡¡
AnsiString/String
³¤×Ö·û´®
^AnsiString
WideString
¿í×Ö·û´®
^WideString
PChar,PAnsiChar
NULL½áÊøµÄ×Ö·û´®
char*
PWideChar
NULL½áÊøµÄ¿í×Ö·û´®
LPCWSTR
Boolean,ByteBool
1×Ö½Ú²¼¶ûÀàÐÍ
ÈκÎ1×Ö½Ú
WordBool
2×Ö½Ú²¼¶ûÀàÐÍ
ÈκÎ2×Ö½Ú
BOOL,LongBool
4×Ö½Ú²¼¶ûÀàÐÍ
BOOL
×¢£ºÓÐ*ǰ׺µÄÊÇÏòÇ°¼æÈÝÀàÐÍ£»ÓÐ^ǰ׺µÄÊÇC++BuilderÌØÓÐÀàÐÍ¡£
C/C++Delphi
ABC
TABC
ACCEL
TAccel
ATOM
TAtom
BITMAP
TBitMap
BITMAPCOREHEADER
TBitmapCoreHeader
BITMAPCOREINFO
TBitmapCoreInfo
BITMAPFILEHEADER
TBitmapFileHeader
BITMAPINFO
TBitmapInfo
BITMAPINFOHEADER
TBitmapInfoHeader
BOOL
Bool
CBT_CREATEWND
TCBT_CreateWnd
CBTACTIVATESTRUCT
TCBTActivateStruct
CHAR
Char
CHAR*
PChar
CLIENTCREATESTRUCT
TClientCreateStruct
COLORREF
TColorRef
COMPAREITEMSTRUCT
TCompareItemStruct
COMSTAT
TComStat
CREATESTRUCT
TCreateStruct
CTLINFO
TCtlInfo
CTLSTYLE
TCtlStyle
CTLtype
TCtltype
DCB
TDCB
DDEAACK
TDDEAck
DDEADVISE
TDDEAdvise
DDEDATA
TDDEData
DDEPOKE
TDDEPoke
DEBUGHOOKINFO
TDebugHookInfo
DELETEITEMSTRUCT
TDeleteItemStruct
DEVMODE
TDevMode
DOUBLE
Double
DRAWITEMSTRUCT
TDrawItemStruct
DWORD
LongInt
ENUMLOGFONT
TEnumLogFont
EVENTMSG
TEventMsg
FARPROC
TFarProc
FIXED
TFixed
FLOAT
Single
GLYPHMETRICS
TGlyphMetrics
HANDLE
THandle
HANDLETABLE
THandleTable
Ïà¹ØÎĵµ£º
Delphi µÄ×Ö·û¼°×Ö·û´®[1] - string¡¢AnsiString¡¢WideString¡¢String[n]¡¢ShortString
2008-10-17 14:57:17
//×î³£ÓÃµÄ string
var
str: string; {¶¨Òå}
begin
str := 'ÍòÒ»'; {¸³Öµ}
ShowMessage(IntToStr(Length(str))); {³¤¶ÈÊÇ: 4}
end;
//³¤×Ö·û´® AnsiString; ÔÚµ±Ç°°æ± ......
{ º¯Êý : RESULTSTRING = HexToBin(HEXSTRING)
{ Ä¿µÄ : °ÑÊ®Áù½øÖÆ×Ö·û´®×ª»»Îª¶þ½øÖÆ×Ö·û´®
{
{===============================================================}
{ º¯Êý : RESULTINTEGER = HexCharToInt(HEXCHAR)
{ Ä¿µÄ : ת»»Ò»¸öÊ®Áù½øÖÆ×Ö·ûΪÕûÊý
{==================================================== ......
Ò»¡¢ÀàºÍ¶ÔÏó
ÀàÊǶÔÏóµÄÀàÐÍ£¬ÊÇ´´½¨¶ÔÏóµÄÄ£°å¡£Ò»¸öÀà¿ÉÒÔ´´½¨¶à¸ö¶ÔÏ󣬶øÒ»¸ö¶ÔÏó×ÜÊÇÊôÓÚij¸öÀà¡£Àà¾ßÓÐÄÚ²¿µÄÊôÐÔ£¨×´Ì¬£©ºÍÐÐΪ£¨²Ù×÷£©¡£
¶ÔÏóÊÇÀàµÄʵÀý£¬¾ßÓÐÇø±ðÓÚͬÀàÆäËû¶ÔÏóµÄÊôÐÔ¼¯ºÏ¡£
¶ÔÏóµÄÉùÃ÷´æ·ÅÓÚ¶ÑÕ»£¬¶ÔÏóµÄÒýÓôæ·ÅÓڶѡ£
¶þ¡¢ÀàµÄ·½·¨·ÖÀà
1¡¢ ÆÕͨ·½·¨
²»¼ÓÈκÎÐÞÊε ......
¡ó[DELPHI]²úÉúÊó±êÍ϶¯Ð§¹û
ͨ¹ýMouseMoveʼþ¡¢DragOverʼþ¡¢EndDragʼþʵÏÖ£¬ÀýÈçÔÚPANELÉϵÄLABEL£º
var xpanel,ypanel,xlabel,ylabel:integer;
PANELµÄMouseMoveʼþ£ºxpanel:=x;ypanel:=y;
PANELµÄDragOverʼþ£ºxpanel:=x;ypanel:=y;
LABELµÄMouseMoveʼþ£ºxlabel:=x;ylabel:=y;
LABELµÄEndDragʼþ£ºlabel ......
Ò»¸öºÜ¼òµ¥µÄÎÊÌ⣬µ«ÎÒƾÎÒѧϰC++/VCÒ»Äê¶à£¬½Ó´¥DelphiµÄʱ¼äÒ²²»¶ÌÁË£¬µ«ÈÔȻд²»³öÀ´¡£
±¾À´ÒÔΪ£¬²»¾ÍÊǽ«Form1.ShowºÍForm1.Hideô£¬µ«È´¾ÍÊÇ´ïµ½²»µ½×Ô¼ºÏëÒªµÄ½á¹û
Õâ¸öÎÊÌâµ¹²»ÓÃ×÷ÉîÈëÑо¿ÁË£¬µ½ÊÇÈÃÎÒ·¢ÏÖ£¬DelphiÒ²²»ÊÇÐÅÊÖÕªÀ´£¬Ê²Ã´¶¼ÊÇÄÇôÈÝÒ׵ģ¬ÒÔΪ×Ô¼ºÓеã¶ùVCµÄµ××Ó£¬¾ÍС¿´ÁËDelphi¡£
×î½üÒ»¶Îʱ ......