"Fix" the definition of 'MainWndProc'.

The changes to the function include:

 - Rename 'MainWndProc' to 'WindowProc';

 - Modify its return type to the correct LRESULT from the original LONG;
   and

 - Rename function parameters.