我收到一个错误:
[DCC错误] Unit_TProcessClass.pas(334):E2010不兼容类型:'TBitmap'和'tagBITMAP'
该类定义为
TMyClass = Class
private
MyBMP : TBitmap;
property aBMP : TBitmap read MyBMP write MyBMP;
Run Code Online (Sandbox Code Playgroud)
代码就像
processABitmap(aMyClass.aBMP) ; -> here is the compile error !!!
Run Code Online (Sandbox Code Playgroud) 嗨,我正在制作一个delphi xe函数,功能是截取屏幕,一切顺利,但问题是我没有看到任何图像上的鼠标光标.
代码如下:
procedure capturar_pantalla(nombre: string);
// Credits :
// Based on : http://www.delphibasics.info/home/delphibasicssnippets/screencapturewithpurewindowsapi
// Thanks to www.delphibasics.info and n0v4
var
uno: integer;
dos: integer;
cre: hDC;
cre2: hDC;
im: hBitmap;
archivo: file of byte;
parriba: TBITMAPFILEHEADER;
cantidad: pointer;
data: TBITMAPINFO;
begin
// Start
cre := getDC(getDeskTopWindow);
cre2 := createCompatibleDC(cre);
uno := getDeviceCaps(cre, HORZRES);
dos := getDeviceCaps(cre, VERTRES);
zeromemory(@data, sizeOf(data));
// Config
with data.bmiHeader do
begin
biSize := sizeOf(TBITMAPINFOHEADER);
biWidth := uno;
biheight := dos;
biplanes := 1;
biBitCount := …Run Code Online (Sandbox Code Playgroud) delphi ×2