>hi george!
>
>I write in the init of the form:
>
>
>
>#DEFINE EWX_SHUTDOWN 1
>DECLARE SHORT ExitWindowsEx IN Win32API;
> SHORT uFlags, INTEGER dwReserved
>
>on shutdown ExitWindowsEx(EWX_SHUTDOWN)
>
>
>and in the click() event of the button i wrote
>read events
>quit
>
>checking the code there are no errors, but, when i click in the button the app ends , but the windows don't shut down.
>
>are any wrong in my definition construction of the rutine? that its, i think that i'm putting code where is not the rigth way, but i don know how to Know(or where to write the code) of the function example that you frienly teach me in your message.
>
>A.M.G
>
>
>ps.
>
>sorry, to use the word ..."definition of the routine". i know that you hate
>the definitions :)
Augusto,
The function requires two parameters. I've never tried to in an ON SHUTDOWN routine. But the proper call would be:
lnresult = ExitWindowsEx(EWX_SHUTDOWN, 0)
Try that.
BTW, I don't hate definitions. In fact, I love them. My signature is based on this premise: Since computers are based on the recursive definition of the state of a single bit (its state being defined as either set or cleared), if a computer science student hated definitions, then he/she would probably hate computers as well. It's hard to do well at something you hate. :-)
George
Ubi caritas et amor, deus ibi est