ExtCreatePen, can someone help?

Can someone give an example in D2 or explanation of how to use
ExtCreatePen?, please.
Specifically I need to print lines with an 8x8 bitmap pattern. I need let
the user to select the pattern, from a list of choices.
I have tried it without success.

Thanks

Luismore