With the following macros I can draw a line on a rectangle :
Function test_BRect
Function OSD_BRect
However, OnScreenDrawEnd closes only the rectangle. If I use "h" as last argument in OnScreenLine, then rectangle is erased before the line appears, as actually expected. Any advice is mostly welcome. I understand I can close these two graphs (rectangle and line) separately.
Let me extend a bit my question. If I need to add some text on this rectangle, I experienced that I can do it inside OSD_BRect, no problem. However, I am wondering whether I have the flexibility to do it in the main module (test_BRect).
Many thanks in advance.
Function test_BRect
int x0 y0 xsc ysc
x0=50; y0=40; xsc=0.8*xres; ysc=0.7*yres
int h=OnScreenDraw(x0 y0 xsc ysc &OSD_BRect 0 0 0 0 h)
OnScreenLine(250 250 400 400 175 2)
3
OnScreenDrawEnd h
3
Function OSD_BRect
function hwnd hdc cx cy param
int hpen oldpen hbrush oldbrush oldfont
int x0 y0 ipen
ipen=8
x0=5; y0=5
hbrush=CreateSolidBrush(14614245); oldbrush=SelectObject(hdc hbrush)
hpen=CreatePen(0 ipen 14614245); oldpen=SelectObject(hdc hpen)
RoundRect hdc x0+ipen y0+ipen cx-(2*x0)-ipen cy-(2*y0)-ipen 3 3
DeleteObject SelectObject(hdc oldbrush)
DeleteObject SelectObject(hdc oldpen)
ret
However, OnScreenDrawEnd closes only the rectangle. If I use "h" as last argument in OnScreenLine, then rectangle is erased before the line appears, as actually expected. Any advice is mostly welcome. I understand I can close these two graphs (rectangle and line) separately.
Let me extend a bit my question. If I need to add some text on this rectangle, I experienced that I can do it inside OSD_BRect, no problem. However, I am wondering whether I have the flexibility to do it in the main module (test_BRect).
Many thanks in advance.