So what I want to do is keep the contents of the List-View control in an
off-screen DC. and Whenever I have to paint the control, I first draw my
background and the list-view contents on top of it. THE PROBLEM is that its
not Blending! The list-view contents completely over-ride my background
(using BitBlt).
I have spent 3 days now trying to figure out a solution to my problem but
have failed. Please Let me Know If you know the answer. I would really
appreciate it!
Best Regards,
Greg
If it were me, I would be looking into Custom Drawing the control (though I
have no experience doing that with a list view control). See here
http://msdn.microsoft.com/library/en-us/shellcc/platform/commctls/custdraw/custdraw.asp?frame=true
However, if you are to proceed along your current path, it sounds like you
need TransparentBlt. This function has a resource leak on Windows 98, so for
Windows 98 or earlier you need to manufacture your own TransparentBlt using
BitBlt. This article explains how:
http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B79212
--
John Carson
As of your second opinion. The problem that I see with it is that Windows XP
uses alpha-blended icons. Which would look horrible when painted using
TransparentBlt. Do you know any way to do it for alpha-blended icons?
Thanks
As of your second opinion. The problem that I see with it is that Windows XP
uses alpha-blended icons. Which would look horrible when painted using
TransparentBlt. Do you know any way to do it for alpha-blended icons?
Thanks
>The problem is the control isn't owned by me. I have subclassed the control
>that belonds to another process and I am trying to paint its background, I
>don't think custom draw would work for me.
If the listview erases its background in WM_ERASEBKGND, try using that
message to paint it.
>As of your second opinion. The problem that I see with it is that Windows XP
>uses alpha-blended icons. Which would look horrible when painted using
>TransparentBlt. Do you know any way to do it for alpha-blended icons?
Once WM_PRINTCLIENT paints them to your DC, the icons have already
been blended with whatever background the listview has -- the alpha
channel information is gone.
--
Sev