<DIV>
<DIV>Be careful : SetTimer needs a message loop.</DIV>
<DIV><A href="http://support.microsoft.com/default.aspx?scid=kb;en-us;102482">http://support.microsoft.com/default.aspx?scid=kb;en-us;102482</A><BR><BR><B><I>Vivek Gupta <vivekg@mac.com></I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Hello,<BR><BR>I wanted to let you know that the Windows Set Timer worked! Thanks a <BR>lot for all of the help!<BR><BR>Here are the couple of lines that I had to add just for reference by <BR>anyone else who might need it:<BR><BR>1) Declaration of the callback<BR><BR>VOID CALLBACK myTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD <BR>dwTime) {<BR>renWin->Render();<BR>}<BR><BR>I have my renderWindow declared globally so I have access to it.<BR><BR>2) Actual creation of the timer<BR>int timer_number = SetTimer( NULL, 0, 20, (TIMERPROC) myTimerProc );<BR><BR>The first parameter would be a handle to the Window that should handle <BR>it and the second is to give an id to the event. However in this case <BR>there is no window that I want to associate it with, just the <BR>application. The third parameter how often the event will be generated <BR>(in milliseconds) and the last is
the callback function.<BR><BR>3) Kill the timer after the event loop exits<BR>KillTimer(NULL, timer_number);<BR><BR>4) For more information take a look at this URL:<BR>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/ <BR>WinUI/WindowsUserInterface/Windowing/Timers/UsingTimers.asp<BR><BR>(Sorry if the URL gets wrapped poorly)<BR></BLOCKQUOTE></DIV><BR><BR>Aurélien REGAT-BARREL<p>
                <hr size=1>
Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout !
<br><a href="http://fr.rd.yahoo.com/mail/taglines/*http://fr.rd.yahoo.com/mail/mail_taglines/default/*http://fr.benefits.yahoo.com/">Créez votre Yahoo! Mail</a>
<br><br>
Dialoguez en direct avec vos amis grâce à <a href="http://fr.rd.yahoo.com/mail/taglines/*http://fr.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.messenger.yahoo.com/">Yahoo! Messenger !</a>