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?
The second parameter you pass to EndDialog is the value returned from DialogBox. It has no system-defined meaning.
Thanks Skywing, that's all I needed to know.