Paul Ishenin wrote:
Luiz Americo Pereira Camara wrote:
function CreatePatternBrush(hbmp:HBITMAP):HBRUSH;
var
Log: TLogBrush;
begin
with Log do
begin
lbColor := 0;
lbHatch := hbmp;
lbStyle := BS_PATTERN;
Result := CreateBrushIndirect(Log);
end;
end;
I warry in this case about DIBs, but for other widgetsets than windows
I can use indeed CreateBrushIndirect.
Yes. In windows case there's a native CreatePatternBrush that already
sets the lbHatch (BS_PATTERN/BS_DIBPATTERN) according to bitmap type. So
no need to use this simplified version.
This example, in fact, was to be used by other widgetsets (similar to
what i did in LCLExtensions package)
Luiz
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives