• Welcome to Valhalla Legends Archive.
 

EndDialog Question

Started by Yegg, January 21, 2006, 08:38 PM

Previous topic - Next topic

Yegg

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?

Skywing

The second parameter you pass to EndDialog is the value returned from DialogBox.  It has no system-defined meaning.

Yegg

Thanks Skywing, that's all I needed to know.