Dear sir or madam,
I just learning to write c++ console app, and now encounter the problem of handling the windows-CLOSE event properly.
Here's the context:
----------------------------------------------------------------------------------------
now the program is runing, if I click the X on the top right conner of console forms, the program trigger a breakpoint(haven't set the breakpoint manually) unexpected and the screen print:
forrtl: error (200): program aborting due to window-CLOSE event
I have search through the internet,method post in codeproject such as:
Console Event Handling[
^]
did not work in win7, and one of this article's reader confirm this, he introduce to use 'Microsoft.Win32.SystemEvents class'
I try but still fail, and one article name 'Microsoft.Win32.SystemEvents.SessionEnding Does Not Work' url: http://vbcity.com/forums/t/165037.aspx
explain this class don't work in visual studio compiler .
has anyone run into this problem before?
can someone introduce a successful solution of event handling in the context of : win7 64bit,VS2010,C++ win32 console ?
thanks you very much!
Zhishang