Reputation: 7840
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.
Upvotes: 0
Views: 188
Reputation: 43311
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.
Upvotes: 1