1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
unit Video;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TFormulaire = class(TForm)
Bouton: TButton;
Log: TMemo;
procedure BoutonClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Formulaire: TFormulaire;
fenetre : tHandle;
fDevice: integer;
DeviceName: array[0..80] of Char;
DeviceVersion: array[0..100] of Char;
Resultat : Boolean;
fCaptureDriverName: string;
implementation
function capCreateCaptureWindow ( lpszWindowName : PChar; dwStyle : DWord; x, y : Integer; nWidth, nHeight : Integer; hwndParent : THandle; nID : Integer ) : THandle; stdcall; external 'AVICAP32.dll';
function capGetDriverDescription ( wDriverIndex : DWord; lpszName : PChar; cbName : Integer; lpszVer : PChar; cbVer : Integer ) : Boolean; stdcall; external 'AVICAP32.dll';
{$R *.dfm}
procedure TFormulaire.BoutonClick(Sender: TObject);
var
fenetre: hwnd;
begin
fenetre := capCreateCaptureWindow(PChar(''), WS_CHILD or WS_VISIBLE or WS_DISABLED, 0, 0, 320, 200, Handle, 0);
end;
end. |
Partager