我有一个VB写的类如下:
Public Type BITMAPINFOHEADER
biSize As Long
biWidth As Long
biHeight As Long
biPlanes As Integer
biBitCount As Integer
biCompression As Long
biSizeImage As Long
biXPelsPerMeter As Long
biYPelsPerMeter As Long
biClrUsed As Long
biClrImportant As Long
End TypePublic Type RGBQUAD
rgbBlue As Byte
rgbGreen As Byte
rgbRed As Byte
rgbReserved As Byte
End TypePublic Type rgb
red As Byte
green As Byte
blue As Byte
End TypePublic Type BITMAPINFO
bmiHeader As BITMAPINFOHEADER
bmiColors As RGBQUAD
End Type前面四个我都会用DELPHI来写了,但后面一个用DELPHI写的时候不知道如果写成类的类型
请教
Public Type BITMAPINFO
bmiHeader As BITMAPINFOHEADER
bmiColors As RGBQUAD
End Type
就这个不会写.
Public Type BITMAPINFOHEADER
biSize As Long
biWidth As Long
biHeight As Long
biPlanes As Integer
biBitCount As Integer
biCompression As Long
biSizeImage As Long
biXPelsPerMeter As Long
biYPelsPerMeter As Long
biClrUsed As Long
biClrImportant As Long
End TypePublic Type RGBQUAD
rgbBlue As Byte
rgbGreen As Byte
rgbRed As Byte
rgbReserved As Byte
End TypePublic Type rgb
red As Byte
green As Byte
blue As Byte
End TypePublic Type BITMAPINFO
bmiHeader As BITMAPINFOHEADER
bmiColors As RGBQUAD
End Type前面四个我都会用DELPHI来写了,但后面一个用DELPHI写的时候不知道如果写成类的类型
请教
Public Type BITMAPINFO
bmiHeader As BITMAPINFOHEADER
bmiColors As RGBQUAD
End Type
就这个不会写.
解决方案 »
- 能否边查询,边显示?
- Delphi中DBGrid改数据的问题?
- 请问如何将一个数据库的数据生成一个excel,并在word文档中导入这个excel对象?
- 如何这样使用滚动条
- convert问题,急需大家帮忙.......
- 有什么办法把canvas上的图形清空?
- 一个简单的问题,如何在循环中检测 另一个按钮?
- 关于在dll文件中能否运用数据组件问题.
- 谁能告诉我网际快车的注册码!!紧急!!!!!!!!!!
- ^_^ 如何dephi中调用excel中的数据?
- 我用delphi做的ocx时在网页中出现DAX ERROR?想问大家这个如何解决呢?
- 如何indy9.0组件TIdTCPClient关于对报文长度的限制
typedef struct tagBITMAPINFOHEADER{ // bmih
DWORD biSize;
LONG biWidth;
LONG biHeight;
WORD biPlanes;
WORD biBitCount
DWORD biCompression;
DWORD biSizeImage;
LONG biXPelsPerMeter;
LONG biYPelsPerMeter;
DWORD biClrUsed;
DWORD biClrImportant;
} BITMAPINFOHEADER; typedef struct tagRGBQUAD { // rgbq
BYTE rgbBlue;
BYTE rgbGreen;
BYTE rgbRed;
BYTE rgbReserved;
} RGBQUAD;
转成pascal代码吧
RGBQUAD=record...end;
BITMAPINFO=record
bmiHeader: BITMAPINFOHEADER;
bmiColors: RGBQUAD;
end;
type
BITMAPINFOHEADER=class
biSize:Integer;
biWidth:Integer;
biHeight:Integer;
biPlanes:Integer;
biBitCount:Integer;
biCompression:Integer;
biSizeImage:Integer;
biXPelsPerMeter:Integer;
biYPelsPerMeter:Integer;
biClrUsed:Integer;
biClrImportant:Integer;
end;
type
RGBQUAD=class
rgbBlue:Byte;
rgbGreen:Byte;
rgbRed:Byte;
rgbReserved:Byte;
end;
type
rgb=class
red:Byte;
green:Byte;
blue:Byte;
end;
最后一个如下:这样转DELPHI编不过去
type
BITMAPINFO=class;
bmiHeader:BITMAPINFOHEADER;
bmiColors:RGBQUAD;
end;
type
BITMAPINFOHEADER=record
biSize:Integer;
biWidth:Integer;
biHeight:Integer;
biPlanes:Integer;
biBitCount:Integer;
biCompression:Integer;
biSizeImage:Integer;
biXPelsPerMeter:Integer;
biYPelsPerMeter:Integer;
biClrUsed:Integer;
biClrImportant:Integer;
end;
你写成class了
我写个答谢你俩进来给分你们..
tagBITMAPINFOHEADER = packed record
biSize: DWORD;
biWidth: Longint;
biHeight: Longint;
biPlanes: Word;
biBitCount: Word;
biCompression: DWORD;
biSizeImage: DWORD;
biXPelsPerMeter: Longint;
biYPelsPerMeter: Longint;
biClrUsed: DWORD;
biClrImportant: DWORD;
end;
TBitmapInfoHeader = tagBITMAPINFOHEADER;
{$EXTERNALSYM BITMAPINFOHEADER}
BITMAPINFOHEADER = tagBITMAPINFOHEADER;
复制自delphi6的vcl源代码