Sleep isn't going to work :/ That would be bad form :)
Maybe add an event handler for PlayStateChange and when the state is 3 (playing) then you can get the video dimensions, duration, etc.
Mark
-- Mark Salsbery Microsoft MVP - Visual C++
"Justin Bozalina" wrote:
[Quoted Text] > Hey Jimmy. I changed the code to try this: > > IWMPControls* pControl = NULL; > IWMPMedia* pMedia = NULL; > > if(m_spWMPPlayer) > { > m_spWMPPlayer->put_URL(bstrURL); > m_spWMPPlayer->put_stretchToFit(TRUE); > } > > m_pWMPCore->get_controls(&pControl); > pControl->play(); > > long width, height; > m_pWMPCore->get_currentMedia(&pMedia); > pMedia->get_imageSourceHeight(&height); > pMedia->get_imageSourceWidth(&width); > > But it still returns zero for the width and height. The functions aren't > failing, they're just not returning the right values. >
|