# Question on refresh rate

This topic is 5193 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello guys, I have been working on a GDI+ gauge for a game called Flight Simulator 2004. This gauge is compiled as a .dll in C++. Unfortunately I have some problems with coding a refresh rate for the gauge. I have a windows timer set to 100ms. Every time 100ms pass, a variable is updated. If the variable is bigger than the previous variable's value(when the class was drawn, then I draw the class. ex:
if(pfd_tmr_upd &gt; pfd_tmr_upd_old)
{
cxpfd.render(pelement-&gt;hdc, &pelement-&gt;image_data.final-&gt;dim);
pfd_tmr_upd_old = pfd_tmr_upd;
}


I set the timer with the Win32 API function SetTimer. I need a pop-up for this gauge, so I have the same gauge being run as a pop-up. The problem is that the whole class is NOT being called when the pop-up is displayed. I differentiate between the pop-up and original gauge with a special parameter, but for some odd reason, the whole class will not render. If I comment out the if statement, then everything is fine, but I really need this timer for performance issues. I double checked that I am not calling the same timer more than once before killing it. Thank you very much for your help in advance. Sincerely, Tiberiu Brasov [Edited by - tiberiu11 on July 28, 2005 10:39:23 AM]

• ### Game Developer Survey

We are looking for qualified game developers to participate in a 10-minute online survey. Qualified participants will be offered a \$15 incentive for your time and insights. Click here to start!

• 11
• 23
• 36
• 16
• 75