How can I create a gradient background, you know, like those lame typical windows installers. Should I use paint brush, paint a palette pic and how? any ideas, hints, thanks.
How can I create a gradient background, you know, like those lame typical windows installers. Should I use paint brush, paint a palette pic and how? any ideas, hints, thanks.
'GradientFill' will do it, and 'PatBlt' can be adapted too. 'FillRect' is too slow (it uses PatBlt ultimately anyway). BTW I think what you are referring to is called 'smooth shading', which may help if you are searching the web for other examples.
[blatant plug warning]There's an example on my wee humble website on how to do both[/end blatant plug warning]
http://www.foosyerdoos.fsnet.co.uk
thanks Ken. I'll see.
will patblt() work in Win3.0 app? or just W9x and later. is PatBlt() slow and limited to like 8x8 or 16x16 bitmap?
>>will patblt() work in Win3.0 app? or just W9x and later. is PatBlt() slow and limited to like 8x8 or 16x16 bitmap?<<
PatBlt is good for win95 and later (according to msdn) so won't work on win3.0. PatBlt is probably as fast as you'll get with gdi but it just fills rectangles.
The 8x8 pixel brush size limit (bitmaps) is for win95 only.
If you are using win3.0 then forget GradientFill, PatBlt etc as they are unlikely to work.