flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
decard 22 Nov 2005, 14:29
When I ran a DOS program from FASMW, the console didn't close after program finished. It closes when running win32 console APP.
|
|||
![]() |
|
vid 22 Nov 2005, 15:00
what happens when you just disable reactions to WM_CLOSE in wndproc, until user presses enter (WM_INPUT)?
|
|||
![]() |
|
decard 22 Nov 2005, 15:10
I'm thinking of implementing this feature in Fresh too, but only as an option that can be disabled.
|
|||
![]() |
|
Tomasz Grysztar 22 Nov 2005, 16:08
The main problem I encountered is that when you attach console to some process, clicking the close button on console window terminates that process without sending any message, and I found no way to catch such event. You can catch the Ctrl+C and similar ones, but closing the console window with mouse seems to be impossible to catch with such simple methods.
|
|||
![]() |
|
vid 22 Nov 2005, 17:16
If i understand right then console window is handled by windows and only sends some of messages to you...
can't you somehow overload console window class, eg. make your own class where you in wndproc catch these window messages and pass others to original handler? |
|||
![]() |
|
madmatt 25 Nov 2005, 21:15
I found this function in the windows SDK.
Could this be what you are looking for? Quote:
|
|||
![]() |
|
Tomasz Grysztar 25 Nov 2005, 21:26
This is what I was talking about - you can catch the Ctrl+C and Ctrl+Break this way, but when someone clicks the X button to close the console window, the whole application gets closed without touching that handler and I was not able to find a way of cancelling this operation.
|
|||
![]() |
|
Reverend 26 Nov 2005, 23:46
Have you tried SetWindowsHookEx? Maybe WH_SYSMSGFILTER or other hook will help?
|
|||
![]() |
|
RedGhost 01 Dec 2005, 20:19
Tomasz Grysztar wrote: It's the partially implemented requested feature; which I have yet tested only on XP. I got one report that it doesn't work as expected in Win98, so I think I will remove it anyway. What I tried to achieve (due to request) was to keep the console window open always even when the program terminates, so you wouldn't have to add some waiting-for-key at the end of your program to see what it displayed. However it appeared to be harder than I thought. pelles c does that for me, very useful feature (imo) _________________ redghost.ca |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.