Microsoft DirectX 9.0 |
A capture device that still uses a Video for Windows (VFW) driver can support any of the following three dialog boxes, which are used to configure the device.
Dialog box | Description |
Video Source | Used to select the video input and to adjust device settings, such as picture brightness or contrast. |
Video Format | Used to select the image dimensions and bit depth. |
Video Display | Used to control the appearance of the rendered video. |
To show one of these dialog boxes, do the following:
The following code shows these steps for the Video Source dialog box:
pControl->Stop(); // Stop the graph.
// Query the capture filter for the IAMVfwCaptureDialogs interface.
IAMVfwCaptureDialogs *pVfw = 0;
hr = pCap->QueryInterface(IID_IAMVfwCaptureDialogs, (void**)&pVfw);
if (SUCCEEDED(hr))
{
// Check if the device supports this dialog box.
if (S_OK == pVfw->HasDialog(VfwCaptureDialog_Source))
{
// Show the dialog box.
hr = pVfw->ShowDialog(VfwCaptureDialog_Source, hwndParent);
}
}
pControl->Run();