//global var:
Uint lhand
Constant long WM_USER=1024
Constant long WM_CAP_START=WM_USER
Constant long WM_CAP_STOP=WM_CAP_START + 68
Constant long WM_CAP_DRIVER_CONNECT WM_CAP_START + 10=
Constant long WM_CAP_DRIVER_DISCONNECT WM_CAP_START + 11=
Constant long WM_CAP_SAVEDIB=WM_CAP_START + 25
Constant long WM_CAP_GRAB_FRAME=WM_CAP_START + 60
Constant long WM_CAP_SEQUENCE=WM_CAP_START + 62
Constant long WM_CAP_FILE_SET_CAPTURE_FILEA=WM_CAP_START + 20
Constant long WM_CAP_SEQUENCE_NOFILE=WM_CAP_START + 63
Constant long WM_CAP_SET_OVERLAY=WM_CAP_START + 51
Constant long WM_CAP_SET_PREVIEW=WM_CAP_START + 50
Constant long WM_CAP_SET_CALLBACK_VIDEOSTREAM WM_CAP_START + 6=
Constant long WM_CAP_SET_CALLBACK_ERROR=WM_CAP_START + 2
Constant long WM_CAP_SET_CALLBACK_STATUSA=WM_CAP_START + 3
Constant long WM_CAP_SET_CALLBACK_FRAME WM_CAP_START + 5=
Constant long WM_CAP_SET_SCALE=WM_CAP_START + 53
Constant long WM_CAP_SET_PREVIEWRATE=WM_CAP_START + 52
//global external function
The public function ulong capCreateCaptureWindowA (string lpszWindowName, ulong dwStyle, long x, long y, long nWidth, long nHeight, ulong ParentWin, long nId) library "AVICAP32. DLL";
//the cb_start w_video
String lpszName
Ulong ul_ll
Ul_ll=handle (w_video)
LpszName='photo collection'
Lhand=capCreateCaptureWindowA (lpszName, 262144 + 12582912 + 1073741824 + 268435456,0,0,200,200 ul_ll, 0)
If lhand<> 0 then
Send (lhand WM_CAP_SET_CALLBACK_VIDEOSTREAM, 0, 0);
Send (lhand WM_CAP_SET_CALLBACK_ERROR, 0, 0);
Send (lhand WM_CAP_SET_CALLBACK_STATUSA, 0, 0);
Send (lhand WM_CAP_DRIVER_CONNECT, 0, 0);
Send (lhand WM_CAP_SET_SCALE, 1, 0);
Send (lhand WM_CAP_SET_PREVIEWRATE, 66, 0).
Send (lhand WM_CAP_SET_OVERLAY, 1, 0).
Send (lhand WM_CAP_SET_PREVIEW, 1, 0).
end if
CodePudding user response:
The words ofThe public function ulong capCreateCaptureWindowA (string lpszWindowName, ulong dwStyle, long x, long y, long nWidth, long nHeight, ulong ParentWin, long nId) library "AVICAP32. DLL";
Instead of
The public function ulong capCreateCaptureWindowA (string lpszWindowName, ulong dwStyle, long x, long y, long nWidth, long nHeight, ulong ParentWin, long nId) library "AVICAP32. DLL" alias for "capCreateCaptureWindowA; Ansi ";
And then try again
CodePudding user response:
Thank you, I used to met alias problem, thank you for reminding me, I try againCodePudding user response:
Or not, it's urgentCodePudding user response:
Call settled, but have no reaction, saved as image really urgent person!//cb_save
String s
S="e: \ save BMP"
If lhand<> 0 then
Send (lhand WM_CAP_SAVEDIB, 0, s)
End the if
And also risk also