Creating the Main Window

You can create the window by calling the CreateWindow function. The GENERIC application creates the window as follows:

hWnd = CreateWindow( "GenericAppClass",
   "Generic Application",
   WS_OVERLAPPEDWINDOW|WS_HSCROLL|WS_VSCROLL,
   0,
   0,
   CW_USEDEFAULT,
   CW_USEDEFAULT,
   NULL,
   NULL,
   hInstance,
   NULL
);

The first parameter is the name of the class that we registered. The remaining parameters specify other window attributes. This call creates the window, but Windows does not display a window until the application calls the ShowWindow function. The GENERIC application displays the window as follows:

ShowWindow( hWnd, nCmdShow );