Board index » delphi » Bitmaps as pens (ExtCreatePen)

Bitmaps as pens (ExtCreatePen)

Hi,
does anyone know how to make ExtCreatePen accept a bitmap? I've tried
several
variations, including the following, which is similar to working code for
brushes:

LogBrush.lbStyle:=BS_Pattern;
LogBrush.lbColor:=DIB_RGB_COLORS;
LogBrush.lbHatch:=aBitmap.Handle;
ahPen:=ExtCreatePen(PS_Geometric,aWidth,LogBrush,0,nil);

Peter

 

Re:Bitmaps as pens (ExtCreatePen)


Quote
"Peter Larson" <pe...@larson.net> wrote in message news:3b051632_1@dnews...
> does anyone know how to make ExtCreatePen accept a bitmap?

You can specifiy a PS_USERSTYLE in Windows NT/2000:
http://msdn.microsoft.com/library/psdk/gdi/pens_6rse.htm

But I don't see how that can be used with a bitmap.

--
efg     e...@efg2.com     Earl F. Glynn, Overland Park, KS  USA

efg's Computer Lab:  http://www.efg2.com/Lab
Mirror:  http://homepages.borland.com/efg2lab/Default.htm

Re:Bitmaps as pens (ExtCreatePen)


Hi Peter,

Quote
> does anyone know how to make ExtCreatePen accept a bitmap?

This will not work with Windows 9X but it will work with Windows 2000 (I
tried both a few days ago).

Thrse

Other Threads