In win32.hlp I find:

EndDialog does not destroy the dialog box immediately. Instead, it sets a flag and allows the dialog box procedure to return control to the system. The system checks the flag before attempting to retrieve the next message from the application queue. If the flag is set, the system ends the message loop, destroys the dialog box, and uses the value in nResult as the return value from the function that created the dialog box.


Does any one know how to kill the dialog (a specific dialog) direcly (with out waiting for the next message to crash the program :) ), thus not using the EndDialog.
Posted on 2002-09-18 14:46:10 by scientica
ExitProcess ?
But that will end the whole program, and not only the dialog... :(

But why do you want to do that ? :rolleyes:
Posted on 2002-09-18 14:49:45 by JCP
ExitProcess, that's a bit over kill; as you said it also kill the entire app, wich I don't want.

Why I want this, well there is a pice of code that simply crashed due to this "delay"; at least that what I think :rolleyes: , so I need to test another way of ending the dialog to see if my suspicion is correct... and some curiosity of course.
Posted on 2002-09-18 14:58:20 by scientica
DestroyWindow will also destroy the dialogbox.

However, if it is a modal dialog box the main window won't know that the dialog is gone and it will remain inactive. Anyway, I did it once and that 's what happened.
Posted on 2002-09-18 16:20:22 by Thanatos