-
SetTimer
Hi,
I need to use the timer but I´m not sure exactly how to use it. I´m want to
use the GetDuration-function of the Windows mediaplayer to be displayed in
static textfield. It returns a double.
I thougth that I only had to use the SetTimer-function to
SetTimer(1,1000,NULL). and then in the OnTimer function catch it. like this:
void CMMediaDlg::OnTimer(UINT nIDEvent)
{
if(nIDEvent==1)
{
CString str = (CString)mpDlg.m_MediaPlayer.GetDuration();
m_Duration.SetWindowText(str);
}
CDialog::OnTimer(nIDEvent);
}
What am I doing wrong? And is there any other way to convert a double into a
string? My guess is that the conversion isn´t done right. Please help me
Frederik.
-
Re: SetTimer
CString str;
str.Format( "%f", mpDlg.m_MediaPlayer.GetDuration());