Page 1 of 1

QuitQuery and Win7

Posted: Fri Apr 10, 2015 10:00 am
by Cliff Wiernik
I had used the quitquery under WinXP to prevent a user from closing the application when open. I think the code is still working. I will verify on an WinXP laptop I still have.

However, under Win7, it appears that this code is bypassed and the application just processes a quit of the application. Has anything changed with this DCGETOPTIONS and does a change have to be made to make it work with Win7.

Re: QuitQuery and Win7

Posted: Fri Apr 10, 2015 10:41 am
by rdonnay
Post a sample program and I will look into this.

Re: QuitQuery and Win7

Posted: Fri Apr 10, 2015 11:27 am
by Auge_Ohr
Cliff Wiernik wrote:However, under Win7, it appears that this code is bypassed and the application just processes a quit of the application.
did you talk about o:systemPowerStatus ?

as it is based on WM_POWERBROADCAST Message it will NOT help you to prevent "Suspend" on OS() > Vista.
Return Value XBP_REJECT of Function QuitQuery() will NOT work this Way on Win7/8/10 e.g. when close Notebook Display.

read more here https://msdn.microsoft.com/en-us/librar ... 85%29.aspx