다음을 통해 공유


Implementing First Play (Windows Embedded CE 6.0)

1/6/2010

Once you have created the data and navigation objects, you can begin to play back data from the DVD-Video volume. The simplest approach to doing this is to create a window for your application, start playing from the first play domain, and then go into a normal message-processing loop.

Creating an Application Window

The following code example contains the routine steps for opening a window.

// Because the hInstance is needed a lot, store it in a global
// instead of passing it around.
g_hInstance = hInstance;

// Create the main application window.  
if (!CreateMainWindow (TEXT("DVDPLAY"))) {
    return -1;
}

ShowWindow(g_hwndMain, nCmdShow);
UpdateWindow(g_hwndMain);

First Play Domain

Once you have created an application window, you can use the IDVDUserOperation::TitlePlay method to begin playing back the first play domain by passing 0 for the byteTitleNumber argument.

//start playback
pAnnexJ->TitlePlay(0);

For more information about the variable pAnnexJ, see Fundamental DVD-Video API Interfaces.

See Also

Concepts

Creating a Simple DVD Player