capSetCallbackOnCapControl
The capSetCallbackOnCapControl macro sets a callback function in the application giving it precise recording control. You can use this macro or explicitly call the WM_CAP_SET_CALLBACK_CAPCONTROL message.
BOOL capSetCallbackOnCapControl(
hwnd,
fpProc
);
Parameters
hwnd
Handle to a capture window.
fpProc
Pointer to the callback function, of type capControlCallback. Specify NULL for this parameter to disable a previously installed callback function.
Return Values
Returns TRUE if successful or FALSE if streaming capture or a single-frame capture session is in progress.
Remarks
A single callback function is used to give the application precise control over the moments that streaming capture begins and completes. The capture window first calls the procedure with nState set to CONTROLCALLBACK_PREROLL after all buffers have been allocated and all other capture preparations have finished. This gives the application the ability to preroll video sources, returning from the callback function at the exact moment recording is to begin. A return value of TRUE from the callback function continues capture, and a return value of FALSE aborts capture. After capture begins, this callback function will be called frequently with nState set to CONTROLCALLBACK_CAPTURING to allow the application to end capture by returning FALSE.
Requirements
** Windows NT/2000/XP:** Included in Windows NT 3.1 and later.
** Windows 95/98/Me:** Included in Windows 95 and later.
** Header:** Declared in Vfw.h.
See Also
Video Capture, Video Capture Macros, capControlCallback, WM_CAP_SET_CALLBACK_CAPCONTROL