hi
i have an application made of several dialogs
each has its own exit button
my question:
whan i press the exit button ... iwant to exit the whole application (not exit the present dialog and return to the Previous one )
how can i do that .....please help me out with this
thank u all

hi
i have an application made of several dialogs
each has its own exit button
my question:
whan i press the exit button ... iwant to exit the whole application (not exit the present dialog and return to the Previous one )
how can i do that .....please help me out with this
thank u all

Are you on Windows or ..? Are you using some GUI library?

ah i just coded a win32 application and i used the following:

Quit program ( the [ x ] ) in the corner

case WM_DESTROY:
{
	PostQuitMessage(0);
	break;
}

you could also do

case <button name>:
{
	PostQuitMessage(0);
	break;
}

PostQuitMessage();

http://msdn.microsoft.com/en-us/library/ms644945(VS.85).aspx

I hope i did this correctly because last time i tryed to give help i got a warning :(

i used
PostMessage(WM_QUIT);
and got
Error: CWinThread::PumpMessage called when not permitted.
could someone explain pleeease

This article has been dead for over six months. Start a new discussion instead.