Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. SetWindowPos doesn't work?

SetWindowPos doesn't work?

Scheduled Pinned Locked Moved C / C++ / MFC
questioncomgraphicshelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 11731824
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups