Working With DVD Menus

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

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.

DVD Applications