flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
asmcoder 12 Jul 2009, 10:00
[content deleted]
Last edited by asmcoder on 14 Aug 2009, 14:49; edited 1 time in total |
|||
![]() |
|
barmentalisk 12 Jul 2009, 10:30
But GetMessage returns 0 itself when recieved WM_QUIT, why should put 0 to eax after PostQuitMessage ?
|
|||
![]() |
|
barmentalisk 12 Jul 2009, 10:46
OK, I see in description of WM_DESTROY messge:
"If an application processes this message, it should return zero. " But who process this zero? DispatchMessage ? |
|||
![]() |
|
asmcoder 12 Jul 2009, 11:00
[content deleted]
Last edited by asmcoder on 14 Aug 2009, 14:49; edited 1 time in total |
|||
![]() |
|
barmentalisk 12 Jul 2009, 13:39
AFAIK GetMessage does not get the result of processing message - DispatchMessage does it.
Am I right? |
|||
![]() |
|
asmcoder 12 Jul 2009, 14:38
[content deleted]
Last edited by asmcoder on 14 Aug 2009, 14:49; edited 1 time in total |
|||
![]() |
|
asmcoder 12 Jul 2009, 14:39
[content deleted]
Last edited by asmcoder on 14 Aug 2009, 14:49; edited 1 time in total |
|||
![]() |
|
barmentalisk 12 Jul 2009, 18:24
I know it all.
GetMessage results in zero if gets WM_QUIT. I wonder why must mov NULL to eax after invoking PostQuitMessage ? I even know that it is a recomendation from MSDN. But how it works? That zero is a return value when returning from WindowProc, WindowProc is called by DispatchMessage, so DispatchMessge takes this value... and what will be if returning value is not zero? |
|||
![]() |
|
baldr 16 Jul 2009, 17:02
barmentalisk,
Probably the answer lies in Win32K.Sys. I think, WindowProc's return value is silently ignored; perhaps it was important in pre-Win32 era (cooperative multitasking?). |
|||
![]() |
|
bitshifter 18 Jul 2009, 02:11
When you push a value for PostQuitMessage the system
sets up for WM_QUIT and places that value in MSG::wParam This is only really useful if the process was spawned and the parent process would like to get an exit code from its child. GetMessage will return zero upon WM_QUIT but PeekMesage will not. As for WindowProc return value it is not ignored but determines required action. Most of the time we return zero to indicate that no further processing is needed but other times returning one or a value to customize handling. There are very few undocumented cases which you never may use. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.