title: Can't load ICON resource in VC++ 2012 Ultimate
body: <p>I am having problem adding icon resource to C++ Win32 Project. I followed the steps in pictures down under but we I run program.exe there is no my icon in menu bar (only default icon). *.exe file has new icon as it should.</p>
  
  <pre><code>int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
  {
      LPCWSTR className = L"MyWindow";
      WNDCLASSEX wc;
      HWND hwnd;
      MSG Msg;
      wc.cbSize        = sizeof(WNDCLASSEX);
      wc.style         = 0;
      wc.lpfnWndProc   = WndProc;
      wc.cbClsExtra    = 0;
      wc.cbWndExtra    = 0;
      wc.hInstance     = hInstance;
      wc.hIcon         = LoadIcon(NULL, MAKEINTRESOURCE(IDI_ICON1));
      wc.hCursor       = LoadCursor(NULL, IDC_ARROW);
      wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
      wc.lpszMenuName  = NULL;
      wc.lpszClassName = className;
      wc.hIconSm       = LoadIcon(NULL, MAKEINTRESOURCE( IDI_ICON1));
      if(!RegisterClassEx(&amp;wc))
      {
          MessageBox(NULL,L"Error, registration of class faild", L"ERROR", MB_OK);
          return 0;
      }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/fGCBI.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/5uIqK.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/C1pWR.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/HJ9xY.png" alt="enter image description here"></p>