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.
The following example shows how to use the MCI_OPEN command to set a parent window and create a child of that window.
MCI_DGV_OPEN_PARMS mciOpen;
mciOpen.lpstrElementName = lpstrFile; // Set the filename.
mciOpen.dwStyle = WS_CHILD; // Set the style.
mciOpen.hWndParent = hWnd; // Give a window handle.
if (mciSendCommand(0, MCI_OPEN,
(DWORD)(MCI_OPEN_ELEMENT|MCI_DGV_OPEN_PARENT|MCI_DGV_OPEN),
(DWORD)(LPSTR)&mciOpen) == 0)
{
// Open operation is successful. Continue.
}