Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Microsoft DirectShow 9.0 |
Working With DVD Menus
The DVD Navigator might show a menu when the user activates a button, or when the Navigator enters the First Play ___domain. To show a menu programmatically, call the IDvdControl2::ShowMenu method.
There are several ways to select menu buttons programmatically:
- To select a button by number, call IDvdControl2::SelectButton. Buttons are numbered 1 to 36. The IDvdInfo2::GetCurrentButton method returns the number of available buttons.
- To select a button relative to the position of the currently selected button, call IDvdControl2::SelectRelativeButton. You can select a button in the up, down, left, or right direction.
- To select a button by its coordinates within the window, call IDvdControl2::SelectAtPosition. This method takes (x,y) coordinates relative to the client area of the video window. (For windowless mode, this is the application window.) If there is no button at that ___location, the method returns VFW_E_DVD_NO_BUTTON.
In addition, there are several ways to activate a button:
- To activate a button by number, call IDvdControl2::SelectAndActivateButton.
- To activate a button by its coordinates, call IDvdControl2::ActivateAtPosition.
- To activate the button that is currently selected, call IDvdControl2::ActivateButton. If no button is selected, the method returns VFW_E_DVD_NO_BUTTON.
Keep in mind that selecting a button merely highlights its borders. To cause the associated command to be fired, the button must be activated. Activating a button programmatically can be done in various ways, but the button must always be selected before it can be activated.
See Also