title: Tiling menuItems in win32 as per particular design
body: <p>I am creating a pop up menu item in win32 . I was able to create a popup menu item and then I added few icons to it. This is how its looking</p>
  <p><a href="https://i.stack.imgur.com/57heK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/57heK.png" alt="enter image description here" /></a></p>
  <p>sameple code</p>
  <pre><code>HMENU Controls = CreatePopupMenu();
      InsertMenu(Controls, 0 , MF_STRING, 1, L&quot;FirstMenu00&quot;);;
  
      static HBITMAP bmpSource = NULL;
      bmpSource = (HBITMAP)LoadImage(NULL, L&quot;C:\\Users\\mac\\bit.bmp&quot;, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
  
      MENUITEMINFO mii{};
      mii.cbSize = sizeof(mii);
      mii.fMask = MIIM_ID | MIIM_BITMAP | MIIM_DATA;
      mii.wID = 1;
      mii.hbmpItem = bmpSource;// &amp;paHbm[i];
  
      bool st = InsertMenuItem(Controls, 10, TRUE, &amp;mii);
      std::string errSTr = GetLastErrorAsString();
  
  
   TrackPopupMenuEx(Controls, TPM_LEFTALIGN | TPM_BOTTOMALIGN | TPM_LEFTBUTTON | TPM_HORPOSANIMATION, xPos, yPos, hwnd, NULL);
  </code></pre>
  <p><strong>I am trying to arrange the menu icons in the following fashion</strong>
  Ie I am trying to create a pattern where first row has 2 icons and the next row has 3 icons .</p>
  <p>How can I achieve the same ?</p>
  <p><a href="https://i.stack.imgur.com/6Tg8y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6Tg8y.png" alt="enter image description here" /></a></p>