title: Dynamic menus in MFC
body: <p>I need to create some dynamic menus in a VS2010 SDI application I'm writing. I've seen this, but don't really understand it
  <a href="https://stackoverflow.com/questions/3673546/dynamic-menu-using-mfc">Dynamic menu using mfc</a></p>
  
  <p>At the moment, I've no idea how to even use GetMenu to get a handle to the menu from my Doc file. I'm trying this, but it says GetMenu doesn't take zero arguments, even though many examples I've seen clearly show this.</p>
  
  <pre><code>CMenu *menu = GetMenu();
  
  
          menu-&gt;AppendMenu(MF_STRING, ID_HIDE, _T("Text"));
  </code></pre>
  
  <p>All I want to do is add a list of files underneath a sub-menu, selected from a database (hence the dynamic part), so a user can select the one they want to work on.</p>
  
  <p>Thanks,
  James</p>