Drawing in window
Ive drawn an object using BeginPaint(), on certain key presses the object changes, but the window doesnt update the display untill i cover the window with another and then show it again.
how do i get the window to repaint on every cycle without regardless of anything else( my structure has a repaint function within the WM_PAINT switch)
i need this because eventualy the object will be changing without interaction from a user.
# 1 Re: Drawing in window
Handle a WM_KEYDOWN message and when your key is pressed simply add the function -
Invalidate(WindowHandle, NULL, true);
Hope this helps.
# 2 Re: Drawing in window
pcbrainbuster I found that the function was InvalidateRgn(hwnd, NULL, true). you led me in the right direction and im greatfull, Thankyou.
# 3 Re: Drawing in window
Woops, lol it was a typo, I was meant to type InvalidateRect. But if you set-up a region then you use InvalidateRgn, I think :p.