And another question - is there a way to apply a logical operation for
FillRect() (or other function, so that the filled color blends with the
background, like BitBlt()-ing with SRCAND)?
F
--------------------
Time is nature's way of keeping everything from happening at once.
(unknown)
The real problem that I've found with WM_PAINT is that most if not all
of the standard controls will do at least some of their painting
directly and leave you out of the loop, but otherwise it shouldn't be a
problem to subclass the control and respond to WM_PAINT by calling
BeginPaint, passing the original WindowProc the WM_PAINT message with
the HDC in WPARAM, and then doing your painting. Remember though that a
combobox can be a combination of several controls each doing their own
painting. Another trick you can try is handling the WM_CTLCOLORxxx
notification from the control by doing a PostMessage of a custom message
to yourself, and after-painting in response to that custom message. The
benefit of the WM_CTLCOLOR notification is that a control will always
send it before it does any painting. Remember though that a combobox
both sends and receives WM_CTLCOLOR notifications. YMMV.
--
Jeff Partch [VC++ MVP]