Timer start problem
-
I am drawing a screen which requires refrehing,so Invalidate() function is called continously.Now I want to start a timer when screen is drawn first time.In the timer i want to call another function which draws another screen after some time.How this could be done? I have tried to start timer but it starts only after when i Maximize 0r minimize a screen. Regards,
priyank
-
I am drawing a screen which requires refrehing,so Invalidate() function is called continously.Now I want to start a timer when screen is drawn first time.In the timer i want to call another function which draws another screen after some time.How this could be done? I have tried to start timer but it starts only after when i Maximize 0r minimize a screen. Regards,
priyank
-
I am drawing a screen which requires refrehing,so Invalidate() function is called continously.Now I want to start a timer when screen is drawn first time.In the timer i want to call another function which draws another screen after some time.How this could be done? I have tried to start timer but it starts only after when i Maximize 0r minimize a screen. Regards,
priyank
pri_skit wrote:
I want to start a timer when screen is drawn first time
// add a member variable
UINT_PTR m_TimerID;...
// initialize in constructor
m_TimerID = 0;...
void OnPaint()
{
...do some painting...if (0 == m_TimerID)
{
m_TimerID = SetTimer(...);
}
}Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
I am drawing a screen which requires refrehing,so Invalidate() function is called continously.Now I want to start a timer when screen is drawn first time.In the timer i want to call another function which draws another screen after some time.How this could be done? I have tried to start timer but it starts only after when i Maximize 0r minimize a screen. Regards,
priyank
And see Timers tutorial[^].