title: Can't create popup Menu
body: <p>I`m trying to create a menu programmatically but the code below fails to create the popup menu in the second menu item (neighbor of file)(in first File->new etc. everything is fine).
  When I click on View it does nothing instead of show SelectAll command.</p>
  
  <pre><code>HMENU menu = CreateMenu();
  HMENU subMenu1 = CreatePopupMenu();
  
  AppendMenu(subMenu1,MF_STRING,IDC_MENU_NEW,_T("New"));
  AppendMenu(subMenu1,MF_STRING,IDC_MENU_EXIT,_T("Exit"));
  
  AppendMenu(menu,MF_POPUP,(UINT_PTR)subMenu1,_T("File"));
  
  SetMenu(dlg,menu);
  HMENU menu2 = CreateMenu(); 
  HMENU subMenu2 = CreatePopupMenu();
  
  AppendMenu(menu,MF_INSERT,(UINT_PTR)menu2,_T("View"));
  AppendMenu(subMenu2,MF_STRING,IDC_MENU_EXIT2,_T("Select All"));
  
  AppendMenu(menu2,MF_POPUP,(UINT_PTR)subMenu2,_T("View"));
  </code></pre>
  
  <p>What am I doing wrong?  Can you point me to somewhere to find the information?</p>