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. How to get Windows media player status(playing/paused) by SendMessage

How to get Windows media player status(playing/paused) by SendMessage

Scheduled Pinned Locked Moved C / C++ / MFC
questiontutorial
2 Posts 2 Posters 1 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.
  • M Offline
    M Offline
    Md Ali Naser Khan
    wrote on last edited by
    #1

    I am using following code for media player play/pause operation HWND mpHandle = ::FindWindow(_T("WMPlayerApp"), _T("Windows Media Player")); if(mpHandle) { ::SetForegroundWindow(mpHandle); ::SendMessage(mpHandle, 0x0111, 0x00004978, 0x00000000);//Play/Pause } By the above code, if windows media player is playing then pause the player otherwise play. How can I get the status of media player whether it is running or it is paused?

    U 1 Reply Last reply
    0
    • M Md Ali Naser Khan

      I am using following code for media player play/pause operation HWND mpHandle = ::FindWindow(_T("WMPlayerApp"), _T("Windows Media Player")); if(mpHandle) { ::SetForegroundWindow(mpHandle); ::SendMessage(mpHandle, 0x0111, 0x00004978, 0x00000000);//Play/Pause } By the above code, if windows media player is playing then pause the player otherwise play. How can I get the status of media player whether it is running or it is paused?

      U Offline
      U Offline
      User 13909216
      wrote on last edited by
      #2

      Did you fix your problem? I also want to get the status, could you please share your solution to me ?

      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