BrindleFly
asked on
MCI, playing an AVI, using my own window
I am using the Media Control Interface to play an AVI file. I can easily open, play and close the AVI file. By default the video plays in it's own window that is created on play.
This is all fine--but unfortunately I want to play the AVI file within my own window. To do this, I have done the following after issuing the open command:
MCI_DGV_WINDOW_PARMS params;
params.hWnd = wnd.m_hWnd;
if (mciSendCommand(m_OpenPara ms.wDevice ID,
MCI_WINDOW,
MCI_DGV_WINDOW_HWND,
(unsigned long)¶ms) != 0)
{
return FALSE; // some error
}
This works... well sort of. When the video initially displays, it appears fine. But as soon as it begins to play, the video appears garbled.
My guess is I might need to handle screen updates or something. Unfortunately I can't find any documentation or samples for this.
Thanks in advance.
This is all fine--but unfortunately I want to play the AVI file within my own window. To do this, I have done the following after issuing the open command:
MCI_DGV_WINDOW_PARMS params;
params.hWnd = wnd.m_hWnd;
if (mciSendCommand(m_OpenPara
MCI_WINDOW,
MCI_DGV_WINDOW_HWND,
(unsigned long)¶ms) != 0)
{
return FALSE; // some error
}
This works... well sort of. When the video initially displays, it appears fine. But as soon as it begins to play, the video appears garbled.
My guess is I might need to handle screen updates or something. Unfortunately I can't find any documentation or samples for this.
Thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.