Re: After EndDialog(...)

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Tim Robinson (tim.at.gaat.freeserve.co.uk_at_invalid.com)
Date: 04/30/04


Date: Fri, 30 Apr 2004 21:48:38 +0100

vipin wrote:
> My msdn also says the same thing and I know english to understand it.
>
> I don't think you are right. I find the dialog ended( atleast I don't
> see it if I put a sleep(5000) after EndDialog(...) before the
> DlgProc returns. This is in win2k sp4. I want to know whether the
> call stack will be valid.
>
>
> windows ---> DlgProc[ EndDialog(...) , DialogBox(....)]

Sure, nothing touches the call stack. Even if EndDialog called DestroyWindow
straight away (which, according to MSDN, it doesn't), the call stack would
be fine. (The stack only goes away if you exit the thread.)

> Does windows still maintain the relation the intial "---->". What if
> the same HWND is alloted to a new window ?

Then you'd be referring to a different window when you thought you were
referring to your own window.

> something is missing in the msdn( some logical sequence????)

I don't think there is.

You could check this with Spy++. Run your program and set up a messages
window on the dialog box itself. Set a breakpoint on the EndDialog call.
Step over it and see what messages the dialog receives. If it's getting
WM_DESTROY and WM_NCDESTROY then the dialog box is going away.

-- 
Tim Robinson (MVP, Windows SDK)
http://mobius.sourceforge.net/


Relevant Pages

  • Re: After EndDialog(...)
    ... >> My msdn also says the same thing and I know english to understand it. ... nothing touches the call stack. ... > referring to your own window. ...
    (microsoft.public.win32.programmer.ui)
  • Re: Implement a SendMessage behaviour
    ... I know the call stack of a thread can't be empty but it was the simpliest way I found to explain the feature I needed. ... I meant I need as less as possible results of user actions in call stack of the thread that will run the new action. ... As soon as the next action is started, that's not a problem if the windows message queue receive some message as they will wait my current action ends to be proceed ... not in any way guarantee that by the time the message sent is actually processed that the window message queue is empty. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: [RosAsm example]
    ... | using a CreateWindowEx() function call to create the main window, ... pop D$return;and reset stack for DefProc ... ;mov edx D$esp+020;whdl ...
    (alt.lang.asm)
  • minidump analysis
    ... A window asking to send error to Microsoft appears and a minidump is ... Only registers, stack and portions of memory are ... System Uptime: not available ... Symbol search path is: srv*c: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Setting size limit of data while reading or writing from sockets
    ... the stack may wait for the application, ... With TCP, the available room in the socket receive buffer is ... Since he has no idea what window TCP advertises to the other end ... ... existing implementations *DO* shrink their windows. ...
    (comp.unix.programmer)