Reini Urban wrote:
Robert May schrieb:
...
If only there was a way to ask AllocWindow() to create a hidden console

[huge snip]

perl2app --gui / pp --gui  created apps, have no console.
So I create them with AllocConsole or CreateProcess and
redirect STDERR/STDOUT to this window, and display it only when requested.

Can I check I understand what you are saying here:

(1) If I create an app with 'pp --gui', and then run it by clicking the exe, I get my window app, without a console.

(2) At some point in my program I want to use print() to output a text string.

(2) I understand how, at that point, I can use AllocConsole(), along with a redirection of STDOUT to get the print()ed output to appear on a console.

(3) Now, say that I don't want to show the console when I create it - there is no way to achieve this with AllocConsole(), so I create the console, and immediately hide it, but get a console 'flash'.

You seen to be saying that I can use CreateProcess() to create a console that I can then redirect STD(IN|OUT|ERR) to in order to see my output. If so, then can you give me a bit more detail about the CreateProcess mechanism you use here. I don't understand what I would pass as the CreateProcess() parameters to achieve this.

To work around the flashing issue I can
1) create it only when requested, but then I loose the previous output,

I intend that Win32::GUI::Console will have an "on-demand" mechanism to create a console when the first write to STD(OUT|ERR) happens.

Regards,
Rob.

Reply via email to