> > bitmap, > > You mean CreateDIBSection and then DrawImage? Right. Except its Drawimage for the background, and then some combination of further DrawImage/DrawIcon and possibly DrawText for each button. And when that is going be pixel blended into the underlying windows, that all of the above takes place into a bitmap that is submitted to UpdateLayeredWindows through a mem DC.
In some circumstances, I could replace the DrawImage by a pixel copy (effectively, a bitblt memory to memory but I have to write my own so that alpha is copied), but I haven ot bothered to do this as it is working well enough now (except for aliasing and drawstring). > > > a definition of what the result is. > > Does this question make sense to you? If so, do you know the > answer? > > Aren't the alpha channels combined automatically in the DC that is > used by GDI+? As far as I see you submit the DC to > UpdateLayeredWindow. But probably I just don't understand... > The DC you submit is a memory DC with a bitmap image of the window you want blended with underlying windows from other apps. So that bitmap must have the alpha values you want to use in the blending, and the colors in that bitmap must be pre-multiplied. Then the updatelayeredwindow call does the final blend. But the alphas in the bitmap I create are not just the ones from some read-in file, rather they are created by the sequence of drawimages, drawicons, drawstrings from above. (And I suspect the reason aliasing is causing problems is that it is creating 0 alpha's; I need to take some time to dump bitmpas to be sure). Anyway, I just re-read the description of BLENDFUNCTION and it answers my question. I really need to pay more attention! Quote from MS: "If the destination bitmap has an alpha channel, then the blend is as follows. Dest.alpha = Src.Alpha + (1 - SrcAlpha) * Dst.Alpha" That is what happens for source over; for source copy composite mode I need to experiment some more. Attention: PowerPro's Web site has moved: http://www.ppro.org Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/power-pro/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/power-pro/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
