Why are you looking in tcalex.prg and tgraph.prg for drawing boxes?
TWindow class has a method Box and is available for every dialog and control too.
oWnd/oDlg/oCtrl:Box( nTop, nLeft, nBottom, nRight, uBorder, uBrush, aText )
uBorder can be Color constant, or oPen or hPen.