Compartilhar via


Working With DVD Menus

 
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:

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