help Progress X GDI

carlos.valentin

New Member
Good afternoon.
A customer had the "shining idea...". To show to graphs right-handers in the screen of a program progress.
I made the following one:
1º I declared gdi as one procedure external:
.
PROCEDURE Rectangle EXTERNAL “GDI.dll” :
DEFINE INPUT PARAMETER nLeftRectx AS LONG .
DEFINE INPUT PARAMETER nLeftRect AS LONG .
DEFINE INPUT PARAMETER nTopRect AS LONG .
DEFINE INPUT PARAMETER nRightRect AS LONG .
DEFINE INPUT PARAMETER nBottomRect AS LONG .
END PROCEDURE.
PROCEDURE PAINT :
/*----------------------------------------------------
------------------------------------------------------ */
DEFINE VARIABLE hdc AS INTEGER NO-UNDO.
DEFINE VARIABLE Okay AS INTEGER NO-UNDO.
RUN GetDC IN h-prog (INPUT FRAME {&frame-name}:HWND,
OUTPUT hdc).
RUN Rectangle IN h-prog (hdc,
0,
0,
FRAME {&frame-name}:WIDTH-PIXELS,
FRAME {&frame-name}:HEIGHT-PIXELS,
OUTPUT Okay ).
RUN ReleaseDC IN h-prog (INPUT FRAME {&frame-name}:HWND,
INPUT hdc,
OUTPUT Okay).
END PROCEDURE.
Everything functioned that is a wonder, but ai comes the problem as I make to paint the rectangle, for example, red, therefore the objective is to create a bar chart in screen.
Or as to each action of ‘choose’ in the button to generate graphs it cleans the screen and it generates the graph again.
Debtor for the attention.
 
Top