hi
i am writing an application where i want to write my own handler for
ok button of a dialog
shown in upper right corner by default which
is meant for exiting the dialog , but here i want to stop exiting of
application if certain condition not satisfied , so what i did is in
WINPROC of dialog i tried to handle the message
WM_DESTROY , but it does not work as even if i return the application
from there the
application still gets destroyed

hoping to get a needfull solution

Re: how to stop dialog from exiting when user taps on ok button in rightUpper corner of a dialog by Sai

Sai
Mon May 01 08:20:00 CDT 2006

You can trap the message from dialog OK like this..
case WM_COMMAND:
if (LOWORD(wParam) == IDOK)
{ Handler (...) } break;
or you can try to trap it by handling WM_CLOSE.

-Sai