objsurface.drawline ix + iparentx + 1, iy + iparenty + 1, ix + iparentx + 1, iy + iparenty + iheight - 1
objsurface.drawline ix + iparentx, iy + iparenty + iheight + 1, ix + iparentx + iwidth + 1, iy + iparenty + iheight + 1
objsurface.drawline ix + iparentx + iwidth + 1, iy + iparenty, ix + iparentx + iwidth + 1, iy + iparenty + iheight + 1
objsurface.setforecolor loldcolor
if len(scaption) > 0 then
icaptionx = ix + iparentx + 10
icaptiony = iy + parenty - 8
bdrawcaption = true
else
bdrawcaption = false
end if
case basewindow
'nothing needed here since we use the base rectangle
if len(scaption) > 0 then
icaptionx = ix + 10
icaptiony = iy + 5
bdrawcaption = true
else
bdrawcaption = false
end if
end select
lbltflags = ddblt_wait