Hi, this is my first question in this forum...i hope you can help me.
I am making a program to shutdown PC, i have using the ExitWindowsEx function, but my application closes all open programs (Word, Excel, Notepad, etc) without saving changes.
I am using the EWX_FORCE flag because I need all the programs closes automatically before pc shutdown. But at the same time I need to save changes in all open application before shutdown, but it must be without user confirmation....you know, without the " Do you want to save changes?.." message. I want to know how can I close automatically all external open apps saving changes previously, and after that, shutdown the pc.
I know that I have to manage the answer to the WM_QUERYENDSESSION message, but I do not how.
Thank you in advance.
I am making a program to shutdown PC, i have using the ExitWindowsEx function, but my application closes all open programs (Word, Excel, Notepad, etc) without saving changes.
I am using the EWX_FORCE flag because I need all the programs closes automatically before pc shutdown. But at the same time I need to save changes in all open application before shutdown, but it must be without user confirmation....you know, without the " Do you want to save changes?.." message. I want to know how can I close automatically all external open apps saving changes previously, and after that, shutdown the pc.
I know that I have to manage the answer to the WM_QUERYENDSESSION message, but I do not how.
Thank you in advance.