The IAMVfwCaptureDialogs interface enables an application to display one of the three dialog boxes (Source, Format, or Display) provided by Microsoft® Video for Windows® capture drivers.
The Video for Windows VFW Video Capture filter implements this interface. It isn't expected that anything else will implement this interface.
Any application that enables the user to change settings in a Video for Windows capture driver-supplied dialog box should use this interface.
Methods in Vtable Order
IUnknown methods Description QueryInterface Retrieves pointers to supported interfaces. AddRef Increments the reference count. Release Decrements the reference count. IAMVfwCaptureDialogs methods Description HasDialog Determines if the specified dialog box exists in the driver. ShowDialog Displays the specified dialog box. SendDriverMessage Sends a driver-specific message.
Determines if the specified dialog box exists in the driver.
Syntax
HRESULT HasDialog(
int iDialog );
Parameters
- iDialog
- [in] Desired dialog box. This is a member of the VfwCaptureDialogs enumerated data type.
Return Value
Returns S_OK if the driver contains the dialog box or S_FALSE otherwise.
Remarks
This method calls the Video for Windows videoDialog function to query for the existence of the appropriate dialog box.
Sends a driver-specific message.
Syntax
HRESULT SendDriverMessage(
int iDialog,
int uMsg,
long dw1,
long dw2 );
Parameters
- iDialog
- [in] Handle of the driver dialog box. This is a member of the VfwCaptureDialogs enumerated data type.
- uMsg
- [in] Message to send to the driver.
- dw1
- [in] Message data.
- dw2
- [in] Message data.
Return Value
Return value varies depending on the implementation within each driver.
Remarks
You should never need to use this method. This method can send any private message to the capture driver. Behavior might be undetermined in response to arbitrary messages; use this method at your own risk.
This method calls the Video for Windows videoMessage function to send the driver message.
Displays the specified dialog box.
Syntax
HRESULT ShowDialog(
int iDialog,
long hwnd );
Parameters
- iDialog
- [in] Dialog box to display. This is a member of the VfwCaptureDialogs enumerated data type.
- hwnd
- [in] Handle of the dialog box's parent window.
Return Value
Returns an HRESULT value that depends on the implementation of the interface.
Remarks
You can't use this method when the driver is streaming or displaying another dialog box. While the driver displays the dialog box you can't stream (pause or run) the filter.
IAMVfwCaptureDialogs::ShowDialog calls the Video for Windows® VideoDialog function to display the appropriate dialog box.
If you use this method to bring up a VfwCaptureDialog_Format dialog box, it will return the VFW_E_CANNOT_CONNECT error code if a capture filter is already connected in a graph and the existing graph cannot accept the new format. Capture applications must rebuild the part of the filter graph that is downstream of the capture filter if this error occurs. See the AMCAP sample code for an example of how to do this.
Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.