Valhalla Legends Archive

Programming => General Programming => C/C++ Programming => Topic started by: Yegg on January 21, 2006, 08:38 PM

Title: EndDialog Question
Post by: Yegg on January 21, 2006, 08:38 PM
I'd like my dialog to close when it receives WM_CLOSE, so I have the following code:

case WM_CLOSE:
EndDialog(hwnd, WM_CLOSE);


But I've also noticed that If I were to do:

case WM_CLOSE:
EndDialog(hwnd, 0);


It seems to work just the same way, that is, it closed out the dialog without an issue.

Is there a "right" way to do this or does it not matter?
Title: Re: EndDialog Question
Post by: Skywing on January 21, 2006, 08:53 PM
The second parameter you pass to EndDialog is the value returned from DialogBox.  It has no system-defined meaning.
Title: Re: EndDialog Question
Post by: Yegg on January 21, 2006, 09:02 PM
Thanks Skywing, that's all I needed to know.