Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem shutting down application under NT

Status
Not open for further replies.

imeijer

Programmer
Nov 30, 2000
5
NL
Hi,

This is a C++ Builder question:

The OnCloseQuery event enables the programmer to set the CanClose variable (the OnCloseQuery event is simply called because the application received a WM_QUERYENDSESSION from Windows I guess). This enables the application to react when Windows sends a WM_ENDSESSION, resulting in the application being terminated.

Why doesn't it work under Windows NT4 / 2000Pro ?? It simply won't shut down...

Thanks in advance,

Ivar
 
try this:

if (Application->MessageBox("Do you want to quit?", "Query", MB_YESNO)==IDYES)
{
CanClose=true;
Application->Terminate();
}

it may be what you already have, and not the answer to your question, but it (in theory) should work... Cyprus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top