Focus issue

new topic     » topic index » view thread      » older message » newer message

I actually found this with an IUP program, but realised it probably affects pretty much everything, and probably always has.
I took the standard windows.exw demo, you know the "A Plain Vanilla Window using Euphoria!" one that uses raw the windows API, and added

puts(1,"hello") 
if wait_key() then end if 
--free_console() -- no help 

at the very start.

I tried it with:
Phix/p.exe - OK
Phix/pw.exe - bad
2.4/exw.exe - bad
2.4/exwc.exe - bad
4.0/eui.exe - bad

In all but one case the window did not actually get focus, so eg Alt-F4 would not close it, but would instead close the console underneath it.
I had hoped that free_console() would help, but apparently not. I can tell you that IupSetFocus() has no effect, not sure about other gui libs.
The fact the p.exe works must be related to it being a shared console or something, rather than any code difference (cmiiw).
Needless to say I would like it to work the same on pw.exe, with a non-shared console, and when run from Edita/Edix.
If you comment out the wait_key(), focus works fine again, so it is something about that, rather than the display/existence of a console.

Does anyone have any suggestions for how to "undo" having played with the console (ideally leaving it visible)?
Does anyone else get different results to me?

Pete

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu