问题:DLL调用图像 |
尚未結案
|
chenliyan163
一般會員 發表:30 回覆:30 積分:12 註冊:2003-09-15 發送簡訊給我 |
下面是我DLL中的代码
library XWJDLL; uses
SysUtils,Classes,Windows,Graphics,ExtCtrls,Dialogs;
type
TResFullCount = record
XRes:integer;
YRes:integer;
BmpRes:Tbitmap;
end; function GetNinePlix(ScrImg: Tbitmap;x, y: integer): TResFullCount;stdcall;
var
BriefVal:TResFullCount;
BriefBmp:Tbitmap;
begin
BriefBmp:=Tbitmap.Create;
BriefBmp.Width:=ScrImg.Width;
BriefBmp.Height:=ScrImg.Height;
BriefBmp.Assign(scrimg);
BriefBmp.Canvas.Brush.Style:=bsClear;
BriefBmp.Canvas.pen.Color:=rgb(255,0,0);
BriefBmp.Canvas.MoveTo(x,0);
BriefBmp.Canvas.LineTo(x,ScrImg.Height);
BriefVal.BmpRes:=BriefBmp;
BriefVal.XRes:=1;
BriefVal.YRes:=1;
result:=BriefVal;
end; //定义别名
exports
GetNinePlix name 'CJGetline'; {$R *.res} begin
end. 当我在button事件中写这句话:GetNinePlix(Image1.Picture.Bitmap,10,10);
系统提示:Cannot saaign a TBitmap to a Tbitmap
这是为什么?
应该如何改?
我的目的是:把源图拷贝一份像画,一条线后返回给另一个图像
|
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |