I want to change my window design rapidly. I have OnPaint function which I am calling when WM_PAINT message received. The design change only when the event occure. I want that design should automatically update doesn't depend on event kindly guide me how can I make it possible.
+1
A:
All drawing code should be placed in WM_PAINT message handler or called from it. Your current code is OK. When window should be redrawn as result of some event, just call Invalidate() or UpdateWindow(), this is indirect call to WM_PAINT message handler.
Alex Farber
2010-04-12 06:33:50
@Alex can you kindly tell me the reference library of Invalidate() function. My program doesn't find it.
Arman
2010-04-12 06:48:17
http://msdn.microsoft.com/en-us/library/dd145005(VS.85).aspxThis is for Win32 programming. For MFC, use CWnd::UpdateWindow: http://msdn.microsoft.com/en-us/library/6yz8we9y(VS.80).aspx
Alex Farber
2010-04-12 07:06:04
The function is called `InvalidateRect`.
avakar
2010-04-12 07:25:06