How to get Windows media player status(playing/paused) by SendMessage
-
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?
-
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?
Did you fix your problem? I also want to get the status, could you please share your solution to me ?