Hello. My function is called when a button is pressed and draws a circle (As in Android >5.0 ). I tested this case on my Acer Iconia Tab w500 (AMD c-60 processor (1.0 Hz 2 cores)), which is generally weak. Everything is drawn on it smoothly, beautifully. But when I launched more powerful on the hardware, the animation began to be drawn so quickly that it was eaten noticeably. If I change the arguments for a powerful computer, then I’m so weak (and not so) as I’ll have too slow. I drew both for and through SetTimer() .

I draw something like this: RECT r; POINT cp; GetCursorPos(&cp); GetClientRect(hwnd,&r); for(int i(0);i<r.right;i++) { Ellipse(hdc,cp.xi,cp.yi,cp.x+i,cp.y+i); } RECT r; POINT cp; GetCursorPos(&cp); GetClientRect(hwnd,&r); for(int i(0);i<r.right;i++) { Ellipse(hdc,cp.xi,cp.yi,cp.x+i,cp.y+i); } RECT r; POINT cp; GetCursorPos(&cp); GetClientRect(hwnd,&r); for(int i(0);i<r.right;i++) { Ellipse(hdc,cp.xi,cp.yi,cp.x+i,cp.y+i); } How to make it look the same on any hardware?

  • And where in your code SetTimer? - VladD
  • It is not clear what exactly the question is - what to optimize for? or how to draw faster? - nzeemin
  • VladD, in WM_TIMER, everything is similarly drawn - Arthur Klochko
  • nzeemin, how to make it look the same on any hardware - Arthur Klochko
  • So. That is, it is necessary that the animation looked smoothly? Then do the drawing through the timer with a small interval, catch WM_TIMER and redraw it - what's the problem? - nzeemin

0