Re: What does WinMain do?
- Posted by Derek Parnell <ddparnell at bigpond.com> Nov 16, 2004
- 489 views
Patrick Barnes wrote: > > On Fri, 12 Nov 2004 23:56:24 -0800, Derek Parnell > <guest at rapideuphoria.com> wrote: > > Hi Derek, > > In your code below, it listens for a WM_QUIT message... how could a > program send that? And how would it send it to itself?
include dll.e include machine.e constant PostQuitMessage = define_c_proc(user32, "PostQuitMessage", {C_INT}) integer exitcode exitcode = 0 c_proc( PostQuitMessage, { exitcode } )
The 'exitcode' value turns up as the wParam field in the WM_QUIT message. This ought to be passed back to the operating system when you end the program. -- Derek Parnell Melbourne, Australia