title: WinMain/Win32 Window not displaying, but shows up in Processes tab of Task Manager
body: <p>I'm a newbie to c++, and I'm stuck on displaying the window. I'm not getting any errors, but my Window is not displaying on the desktop. When I open the task manager, it appears under the 'Proccesses' tab. I haven't been finding any solutions to this problem, so any help is appreciated. Thanks! :)</p>
  
  <p>**Note: I'm using Microsoft Visual Studio 2012
  **Note: Not exactly a newbie to c++, but more to creating a win32 application</p>
  
  <pre><code>#include &lt;Windows.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  #include &lt;tchar.h&gt;
  
  static TCHAR WindowClass[] = L"Window";
  
  LRESULT CALLBACK WindowProc(
      HWND   WinH,
      UINT   Msg,
      WPARAM wParam,
      LPARAM lParam
      )
  {
      switch (Msg)
      {
          PAINTSTRUCT pntStruct;
          static HDC hdc;
  
          case WM_PAINT:
          {
              BeginPaint(
                  WinH,
                  &amp;pntStruct
              );
              TextOut(hdc,
                  5, 5,
                  L"Hello, World!", _tcslen(L"Hello, World!"));
              //pntStruct.rcPaint
              EndPaint(
                  WinH,
                  &amp;pntStruct
              );
  
          } break;
  
          case WM_SIZE:
          {
  
          } break;
  
          case WM_MOVE:
          {
  
          } break;
  
          case WM_DESTROY:
          {
  
          } break;
  
          case WM_CLOSE:
          {
  
          } break;
  
          default:
          {
              return DefWindowProc(WinH, Msg, wParam, lParam);
          } break;
  
          case WM_ACTIVATEAPP:
          {
              if (WM_ACTIVATEAPP)
              {
                  OutputDebugStringA("WM_ACTIVEAPP-&gt;TRUE");
              }
              else
              {
                  OutputDebugStringA("WM_ACTIVEAPP-&gt;FALSE");
              }
          } break;
  
      }
  
      return 0;
  };
  
  
  int WINAPI WinMain(
      HINSTANCE Window,
      HINSTANCE PrevInstance,
      LPSTR     Cmd,
      int       CmdShow
      )
  {
  
      WNDCLASSEX wclass;
          //wclass.cbSize =  sizeof(WNDCLASS);
          wclass.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
          wclass.lpfnWndProc = WindowProc;
          wclass.cbClsExtra = 0;
          wclass.cbWndExtra = 0;
          wclass.hInstance = Window;
          //wclass.hIcon; TODO: CREATE ICON
          //wclass.hCursor;
          //wclass.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
          wclass.lpszMenuName = NULL;
          wclass.lpszClassName = (LPCTSTR)WindowClass;
  //      HICON     hIconSm;
          RegisterClassEx(&amp;wclass);
  
      HWND CreateWin = CreateWindow(
          WindowClass,
          L"NAME OF WINDOW",
          WS_VISIBLE | WS_OVERLAPPEDWINDOW,
          CW_USEDEFAULT,
          CW_USEDEFAULT,
          CW_USEDEFAULT,//WIDTH:[TODO]-&gt;Make custom width to fit window
          CW_USEDEFAULT,//HEIGHT:[TODO]-&gt;Make custom width to fit window
          0,
          0,
          Window,
          0
      );
  
      ShowWindow(CreateWin, CmdShow);
      UpdateWindow(CreateWin);
  
      MSG message;
  
      while (GetMessage(&amp;message, NULL, 0, 0) &gt; 0)
      {
          TranslateMessage(&amp;message);
          DispatchMessage(&amp;message);
      };
  
      return 0;
  };
  </code></pre>