R3Pa4eK
Advanced Member | Редактировать | Профиль | Сообщение | ICQ | Цитировать | Сообщить модератору library image; uses Windows, GDIPAPI, GDIPOBJ, GDIPUTIL; {$R *.res} procedure CreateImage(wnd: HWND; FileName: PChar; X, Y, W, H: Integer) stdcall; var img: TGPImage; graph: TGPGraphics; p: TGPRectF; begin try img := TGPImage.Create(filename); p.X:=x; p.Y:=y; p.Width:=w; p.Height:=h; graph := TGPGraphics.Create(getdc(wnd)); graph.DrawImage(img, p); except end; end; procedure ImageApplyChanges(wnd: HWND) stdcall; begin RedrawWindow(wnd, PRect(0), 0, RDW_FRAME or RDW_INVALIDATE); InvalidateRect(wnd, PRect(0), true); end; procedure ImageDestroy(); stdcall; begin img.Free; graph.Free; end; exports createimage; exports ImageApplyChanges; exports ImageDestroy; begin end. |