Re: CClientDC and TabCtrl ?
cdg wrote:
The painting must be done in the WM_PAINT message handler OnPaint.
So, it's necessary to create a WM_PAINT message handler for each Tab Page
Form that requires any painting. But how is it called. I tried
UpdateWindow() and it didn't work.
The way that I've written this program, there is a function call (with
arguments) to a member function of this Tab Page Form Class. And then after
some processsing in this function, I just used the code that I previouly
posted to paint the bitmaps on the Tab Form.
Could you explain how I should correctly write this.
You must do all window painting in OnPaint, using CPaintDC. This is a
requirement of all Windows programs.
Windows will send the WM_PAINT message any time the window is displayed
or uncovered by other windows. You don't have to call anything to make
that happen: Windows does it.
Never call OnPaint yourself. If your data changes and you want to cause
a repaint because of the change then call the window's Invalidate()
function. That will tell Windows to send another WM_PAINT.
--
Scott McPhillips [VC++ MVP]