title: What could cause LoadFrame to return false
body: <p>There is a current answer, which may be my problem - like the previous questioner, I'm upgrading legacy code only from 20 years ago, now.  In 2014, Ryan McCloskey wrote <a href="https://stackoverflow.com/questions/23157469/window-creation-failed-loadframeidr-mainframe-fails-c">Window creation failed - LoadFrame(IDR_MAINFRAME) Fails C++</a>
      I'm not sure I have the same problem.  There are other examples of this problem on other sites, always occurring when upgrading legacy code, but everybody's solution is different.
      I am unable to step into the LoadFrame code because I get the error xxxxx.dll'. Cannot find or open the PDB file for 30 dlls.  I do not get this error when I use a totally new project.
      I created this project "from existing files," and I'm wondering if either I did not select an option I needed or selected one I shouldn't have.  </p>
  
  <p>If my problem is the same as Mr. McCloskeys, I need to know:  what was the wrong library and what should be the correct library.  I'm using Visual Studio 2017, not 2010, as he was using.  Once I determine what library to use (assuming that this is still the same problem, which it sure looks like), how do I set the correct library in V.S. 2017.</p>
  
  <p>The code is below my signature.</p>
  
  <p>Thank you.</p>
  
  <p>Linda </p>
  
  <pre><code>HWND  app_hwnd       = NULL;    
  DWORD val_type       = REG_SZ;
  char  path[MAX_PATH] = {NULL};
  DWORD buff_size      = MAX_PATH;
  CMultiDocTemplate *pDocTemplate;
      /* find running application, if any */
  app_hwnd = FindWindow(NULL, CStrings::ServerAppTitle);
  
  
  if(app_hwnd != NULL)
  {
      /* application already running, generate warning and exit */
      ::MessageBox(NULL, CStrings::EMRunning, CStrings::Warning,
                      MB_OK | MB_ICONWARNING | MB_SYSTEMMODAL);
      exit(1);
  }
  
  
  #ifdef _DEBUG
      afxMemDF |= checkAlwaysMemDF;   // Check for memory overwrite.
  #endif
  AfxEnableControlContainer();    
  
  UINT nIDResource = IDR_EMNTTYPE;
  
  // we need to hold RDC template to force RDC creation at startup
  pDocTemplate = new CMultiDocTemplate(
          nIDResource,
          RUNTIME_CLASS(CCMetRDoc),
          RUNTIME_CLASS(CCMRChFrm),
          RUNTIME_CLASS(CCMRView));
  AddDocTemplate(pDocTemplate);
  
  
  // create main MDI Frame window
  CMainFrame* pMainFrame = new CMainFrame(this);
  
  EM_ASSERT(pMainFrame);
  
  
  if (!pMainFrame-&gt;LoadFrame(IDR_MAINFRAME)) {
  </code></pre>