SetWindowPos doesn't work?
-
I want to play two movies at the same time side-by-side, one using MCIWnd and the other one using CMediaPlayer (Windows Media Player ActiveX Control). The following code does it, except that I have a background image that should appear on top of the two controls. My question: why the bitmap doesn't appear on top of the CMediaPlayer control (while the bmp appears on top of the MCIWnd control!) ? I thought ::SetWindowPos( ... , HWND_BOTTOM, ...) will place the control at the bottom of all other control? void CMyDlg::OnButton1() { HWND hMCI; hMCI = MCIWndCreate(m_hWnd,AfxGetApp()->m_hInstance, MCIWNDF_SHOWNAME|MCIWNDF_NOMENU, "C:\\1.avi"); ::SetWindowPos(hMCI, HWND_BOTTOM, 10,10,200,200, SWP_SHOWWINDOW); MCIWndPlay(hMCI); // CMediaPlayer2 is a class from Windows Media // Player ActiveX control CMediaPlayer2 m_media; m_media.Create( "Media", WS_VISIBLE, CRect(250, 10, 550, 260), this, 1234); ::SetWindowPos(m_media.m_hWnd, HWND_BOTTOM, 250, 10, 200, 200, SWP_SHOWWINDOW); m_media.SetFileName("C:\\2.avi"); m_media.Play();} If anyone can explain this to me, I really appreciate it. Thanks for any help in advance.