(Gast)
n/a Beiträge
|
Re: Stretch bei Panel?
30. Dez 2004, 16:00
Ich benutze die funktion
Delphi-Quellcode:
const
WM_CAP_DRIVER_CONNECT = WM_USER + 10;
WM_CAP_EDIT_COPY = WM_USER + 30;
WM_CAP_SET_PREVIEW = WM_USER + 50;
WM_CAP_SET_OVERLAY = WM_USER + 51;
WM_CAP_SET_PREVIEWRATE = WM_USER + 52;
function capCreateCaptureWindow(lpszWindowName: LPCSTR;
dwStyle: DWORD;
x, y,
nWidth,
nHeight: integer;
hwndParent: HWND;
nID: integer): HWND; stdcall;
external 'AVICAP32.DLL' name 'capCreateCaptureWindowA';
procedure GetPic(Panel: TPanel);
begin
Picture := capCreateCaptureWindow('Video',ws_child+ws_visible, 0,
0, 640, 480, Panel.Handle, 1);
SendMessage(Picture, WM_CAP_DRIVER_CONNECT, 0, 0);
SendMessage(Picture, WM_CAP_SET_PREVIEWRATE, 30, 0);
sendMessage(Picture, WM_CAP_SET_OVERLAY, 1, 0);
SendMessage(Picture, wm_cap_set_preview, 1, 0);
end;
Und da muss ich
Picture := capCreateCaptureWindow('Video',ws_child+ws_visible , 0,
0, 640, 480, Panel.Handle, 1);
das handle angeben.
Mfg MrScholz
Edit: @ helmi Ich möchte ja das panel klein halten also nur 320x240 und da soll alles drauf zu sehen sein.
|
|
Zitat
|