title: updating a string table with UpdateResource
body: <p>I asked the question here - <a href="https://stackoverflow.com/questions/14054765/updating-string-table-via-updateresource-adding-multiple-strings">updating STRING TABLE via UpdateResource (adding multiple strings)</a></p>
  
  <p>And now I am asking again, as this time I can add alot more detail to the question.</p>
  
  <p>I've been trying this for the past day or something to no real avail.
  What I want the outcome to be is like this (I manually added the strings in MSVS):
  As you can see, multiple entries, and it's "clean" and can be easily accessed by the program!
  <img src="https://i.stack.imgur.com/8jpF6.png" alt="enter image description here"></p>
  
  <p>Right now, my source:</p>
  
  <pre><code>wstring buffer[5] = {L" Meow",L" I",L" Am",L" A",L" Dinosaur"}; // ignore the string
  if (HANDLE hRes = BeginUpdateResource("Output.exe",TRUE))
  {
      for (int i = 0; i &lt; 5; i++)
      {
      wchar_t * temp;
      temp = new wchar_t[(buffer[i].length()+1)];
      wcscpy(temp,buffer[i].c_str());
      wcout &lt;&lt; temp &lt;&lt; endl;
      UpdateResource(hRes,RT_STRING,MAKEINTRESOURCE(1),MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
                     temp, 48); //buffer[i].length()+1
      delete[] temp;
      }
      EndUpdateResource(hRes,FALSE);
  
  }
  </code></pre>
  
  <p>Produces:
  <img src="https://i.stack.imgur.com/PbaYU.png" alt="enter image description here"></p>
  
  <p>Which is wrong, as it seems to only have added the last string to the table, not the strings before it!</p>
  
  <p>When I try modifying the source so MAKEINTRESOURCE(1) is now "MAKEINTRESOURCE(i)", the outcome is this as shown in various pictures:
  <img src="https://i.stack.imgur.com/qqxzg.png" alt="http://gyazo.com/5fa7a6682d5da2def4683227533b2755.png">
  <img src="https://i.stack.imgur.com/u6YyB.png" alt="http://gyazo.com/e77f6e90cb3dbfe21d07b3d55c931acb.png">
  <img src="https://i.stack.imgur.com/WMfmh.png" alt="http://gyazo.com/2e632768e2cdfcea8ab9cd08caea9cc8.png">
  <img src="https://i.stack.imgur.com/rJJqO.png" alt="http://gyazo.com/f9dcd68c671923d8faefce76877bc3be.png"></p>
  
  <p>Success in the fact it added all the strings, but it seems to have created various string tables which is not what was desired. Although I do notice the ID's have incremented by 16 in each picture which could possibly explain something. Basically, I want the strings to be formatted as in the first picture (with the multiple strings), but have no real idea how to do this.</p>
  
  <p>Thank you for your assistance.</p>