[C++]Code läuft nicht

Kann mir jemand sagen, warum folgender Code nicht läuft?
Beziehungsweise er läuft ja, aber das Fenster wird nicht erstellt und ich weiss nicht, warum.

#define WIN32\_LEAN\_AND\_MEAN

#include 
#include "resource.h"

//HWND MainWindow;


LRESULT CALLBACK MessageHandler( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam );

int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd )
{

 MSG msg;
 HWND MainWindow;
 WNDCLASS wc;


 wc.hInstance = hInstance;
 wc.lpfnWndProc = (WNDPROC)MessageHandler;
 wc.lpszClassName = "SimpleWindow";

 //wc.lpszMenuName = (LPCSTR)IDR\_MENU1;

 //wc.hIcon = LoadIcon( hInstance, (LPCSTR)IDI\_ICON1 );
 //wc.hCursor = LoadCursor( hInstance, (LPCSTR)IDC\_ARROW );
 wc.hbrBackground = (HBRUSH)GetStockObject(GRAY\_BRUSH);

 RegisterClass( &wc );

 MainWindow = CreateWindow( "SimpleWindow", "SimpleWindow", WS\_OVERLAPPEDWINDOW,
 100, 100, 300, 400, 0, 0, hInstance, NULL );


 if ( !MainWindow )
 {
 MessageBox( NULL, "Das Fenster wurde nicht erstellt!", "Fehler", MB\_OK );
 PostQuitMessage( 0 );
 }

 ShowWindow( MainWindow, nShowCmd );

 MessageBox( MainWindow, "tes", "test", MB\_OK );

 while ( GetMessage( &msg, NULL, 0, 0 ) )
 {
 MessageBox( MainWindow, "test", "test", MB\_OK );
 TranslateMessage( &msg );
 DispatchMessage( &msg );
 }

 return 1; // eigentlich beliebig

}