hi all,
I wrote the following procedure and registered it via "SetWindowLong()" to my mainPanel like described above:
LRESULT APIENTRY EditSubclassProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
{
if(uMsg==WM_QUERYENDSESSION || uMsg==WM_ENDSESSION)
{
//Do cleanup...and:
QuitUserInterface (0);
}
//Standard-Methode
return CallWindowProc((WNDPROC) pOldEventHandler, wnd, uMsg,wParam, lParam);
}
two things I do not understand:
1. it runs ok under XP, but the method is not called by the OS under W2K
2. the WM_ENDSESSION is pending. so the OS goes down after closing my application manually. is it possible to change this ?
Any comments or ideas ?
Thanks and best regards
Simon