Return value of WinMain()

Hi, i know the return value from WinMain should be the message wParam (msg.wParam).

But my question is why? What is the point in us returning this?

Thanks
Nowadays, nothing. Currently windows completely ignores the return value of WinMain, I think it used to be important back in the 16 bit times.

As a convention, WinMain should return 0 if it terminates before the msg loop is entered, and msg.wParam if it terminates for some other reason.

(It DOES matter if you call other programs from your programs though - in that case you could use the return value to determine what was the reason for the program to quit).
Last edited on
thanks
Topic archived. No new replies allowed.