Microsoft DirectX 9.0 |
The logical structure of DVD menus is discussed in DVD Basics. An application can display a menu from the disc by calling IDvdControl2::ShowMenu and passing the index of the desired menu.
Keep in mind that selecting a button merely highlights its borders. To cause the associated command to be fired, the button must be activated. Some IDvdControl2 methods select a specified button, some activate a button, and SelectAndActivateButton does both. The selection and activation of menu buttons using the mouse is demonstrated in the DVD sample application in CDvdCore::OnMouseEvent.
The IDvdControl2 menu-related methods enable an application to control menus programmatically. An application can highlight or select a button based on a mouse movement or any other user action or some other program logic. An application can also implement and control a custom menu or bitmap representing the buttons on a DVD remote control. In the DVD sample application, the relative button menu commands are connected to the keyboard arrow keys (see CDvdCore::OnKeyEvent). Activating a button programmatically can be done in various ways, but the button must always be selected before it can be activated.