[fpc-pascal]Obtaining Windows API handle of a new console.

MPDJ MPDJ at btinternet.com
Sat Apr 21 15:54:55 CEST 2001


Hi again,

I've been experimenting with the ideas you guys gave me:-

> Depends of the type of handle you want to know:
> window handle: I think the method proposed by Marco is correct. Although >
I'm not sure if it doesn't fail under certain circumstances
> process handle: GetCurrentProcess()
> thread handle: GetCurrentThread()

I'm always getting NULL returned when I try to find the console window
handle. I assume it's because the console is not actually a window? I've got
the thread and process info., but no handle. Even FindWindow returns the
same answer.

I think I've been barking up the wrong tree again ;-)

Does this mean I can't send my console app. to the back or bring to the
front of the desktop like a can a GUI app.?

Andy





More information about the fpc-pascal mailing list