title: how do i fix a "identifier is undefined" error in a simple C++ application?
body: <p>I have searched everywhere, but to no avail. Could someone tell me what's wrong with this code? It is giving me the "Error: Identifier "XXX" Is Undefined"</p>
  
  <pre><code>    #include &lt;windows.h&gt;
  int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
      LPSTR lpCmdLine, int nCmdShow)
  {
      MSG msg;
      MyRegisterClass(hInstance);
      if(!InitInstance (hInstance, nCmdShow))
          return false;
      while (GetMessage(&amp;msg, NULL, 0, 0))
      {
          TranslateMessage(&amp;msg);
          DispatchMessage(&amp;msg);
      }
      return msg.wParam;
  }
  </code></pre>