HI Gurus !
I need someone to help me about my activex controls.Actually I'm developping a control that will display the time in Digital notation and in the analog one at a mouse click.but when I got the system time and try to display it in the OnDraw() function It doesn't work and since I'm wondering how to get the time for an activex control.Here is what I tried in the onDraw() :

// get the time

CTime Curtime = CTime::GetCurrentTime();
CString sTime;
sTime.Format("%02d:%02d:%02d",
Curtime.GetHour(),Curtime.GetMinute(),Curtime.GetSecond());

//calculate the new width and height to hold the time value

int nChars = sTime.GetLenght();
int n NwWidth = (rcBounds.Width()/nChars)-3;
int nNwHeight = rcBounds.Height();

//Display the time
pdc->TextOut(nNwWidth,nNwHeight,sTime,sTime.Getlength());

Please tell me what is wrong with my code,and How can I get the time for an activex Control
Thanks a lot !!!!!!!!!