Glenn Linderman wrote:
On approximately 6/6/2006 2:08 PM, came the following characters from the keyboard of Robert May:
Reini Urban wrote:
Robert May schrieb:
...
If only there was a way to ask AllocWindow() to create a hidden console, but I read that it's impossible. (I do want to explore the possibility of using a global hook to see if I can catch one of the messages that happens early during window creation, and fiddle the WS_VISIBLE style, but I'm not hopeful!)

I can confirm that as I read elsewhere, it does not seem possible to either subclass or hook (SetWindowsHookEx(WH_CBT, ...)) a console window.

You can create it offscreen, to the right or left.
So you can use CreateProcess() with
dwCreationFlags += CREATE_NEW_CONSOLE, instead of AllocConsole()

And STARTUPINFO.dwX holds the offscreen position.
Interesting idea, but I don't think I'm following you here. CreateProcess() will create me a new process, and I can't see how I'd read/write to that process's console from my perl script.

Regards,
Rob.

It seems that Reini's idea might be useful to stop flashing consoles for subprograms, but not for the original program?

That was my thinking too - but perhaps Reini is
hinting at something that I do not understand?

If you want to start a sub-process hidden, then
  Win32::SetChildShowWindow(SW_HIDE);
is probably easier :-)

Rob.

Reply via email to