c++ win32 where to draw a meter
I need to draw a meter using simple rectangles in a win32 app using开发者_如何学C c++. What would be the best method to draw a meter in a window (it should be redrawn, every 10ms)? Should i draw it directly into the window (on message WM_PAINT) or use some other component and draw into that?
Create a timer and respond to the WM_TIMER message by invalidating the part of the window that contains the meter using InvalidateRect. This will automatically generate WM_PAINT messages, but will keep them from piling up if the program falls behind.
精彩评论