I want to draw lines on a button (e. g. a rectangle), I use the following code:
Code: Select all
CreateGadgetList(WindowID())
ButtonGadget(0, 0, 0, 64, 64, "")
GadgetToolTip(0, "Process")
*hButton = GadgetID(0)
*hDC = GetDC_(*hButton)
; MessageRequester("hDC", Str(*hDC), #PB_MessageRequester_Ok)
MoveToEx_(*hDC, 5, 14, 0)
LineTo_(*hDC, 59, 14)
LineTo_(*hDC, 59, 50)
LineTo_(*hDC, 5, 50)
LineTo_(*hDC, 5, 14)
ReleaseDC_(*hButton, *hDC)
Who can give me a tip.
Thanks.
Stefan