[fpc-pascal]Graph for Windows
Pierre Muller
pierre at idefix.wisa.be
Thu May 30 01:19:29 CEST 2002
At 07:52 29/05/02 -0700, Rich Pasco wrote:
>While we're on the subject...
>
>Can I accept keyboard input while the graph window has the focus?
>
>I ported (from Borland Pascal) a Graph application that displays a graph
>and then accepts keyboard input via the CRT unit's functions Keypressed
>and ReadKey, based on which it modifies the graph. When I compile and
>run my app under Free Pascal for the Win32 target, the graph window
>opens up, but the keyboard is ignored unless the user switches the focus
>back to the console window from which the app was launched. This is
>awkward because the user has to remember to do it, and then the console
>window partially obscures the graph. I would prefer to read the
>keyboard directly while the graph window has the focus, but how?
I am working on such a unit,
for fvsion win32 graph support.
What it basically does is to translated
graphic mode system messages
like WM_KEYDOWN, or WM_LBUTTONDOWN and so on
into INPUT_RECORD that I push in the
input handle of the Console.
The problem is that the current version requires to modify the win32
graph unit...
But otherwise it does work...
You can get the unit called win32gr.pas
in the fvision CVS repository.
The RTL changes are not yet commited :(
More information about the fpc-pascal
mailing list