// // oXbp is XbpDialog():drawingArea // // First I created the rounded region for the box. APICreateRoundedRegion_(oXbp, nXTop,nYTop, nXBottom,nYBottom, nXradio, nYradio, .f.) // // This function uses : // cCallRounded := DllPrepareCall(nHandle, DLL_STDCALL, 'CreateRoundRectRgn') // cCallSetRegion := DllPrepareCall(nHandle, DLL_STDCALL, 'SetWindowRgn') // cCallDelete := DllPrepareCall(nHandle, DLL_STDCALL, 'DeleteObject') // // DllExecuteCall(cCallRounded, nXTop,nYTop, nXBottom,nYBottom, nXradio, nYradio) // DllExecuteCall(cSetRegion, oXbp:getHWND(), hRegion) // DllExecuteCall(cCallDelete, hRegion) // // Rendering the tip oPS := oXbp:lockPS() // // This code did not work aAttrL[GRA_AL_COLOR] := nColorBox aAttrA[GRA_AA_BACKCOLOR] := GraMakeRGBColor(...) aAttrA[GRA_AA_COLOR] := GraMakeRGBColor(...) oPS := oXbp:lockPS() aOldL := GraSetAttrLine(oPS, aAttrL) aOldA := GraSetAttrArea(oPS, aAttrA) lOk := GraBox(oPS, aLeft, aTop, GRA_OUTLINEFILL, nRaioX, nRaioY) GraSetAttrLine(oPS, aOldL) GraSetAttrArea(oPS, aOldA) oXbp:unlockPS() // // This code is working aOldColors := oPS:setColor(nColorBg, nColorBg) GraBox(oPS, aLeft, aTop, GRA_FILL) oPS:setColor(nColorBox, nColorBg) aAttrL[GRA_AL_WIDTH] := nLineWidth nLineWidth := Max(nLineWidth, 2) aTop[01] -= nLineWidth aTop[02] -= nLineWidth aOldAttrL := GraSetAttrLine(oPS, aAttrL) GraBox(oPS, {(nLineWidth - 1),(nLineWidth - 1)}, aTop, GRA_OUTLINE, 9, 9) oPS:setColor(aOldColors[01], aOldColors[02]) GraSetAttrLine(oPS, aOldAttrL) oXbp:unlockPS()