title: How to instanciate same dialog in MFC C++?
body: <p>I want to build a MFC dialog in which I add a simple <code>TabControl</code>. I want my tab pages to be instances of the same <code>CDialog</code>, but with some different parameters (such as which buttons are shown, for example).</p>
  
  <p>I am using Visual Studio 2008.</p>
  
  <p>I am relatively new to C++, but I've seen that each component (CButton, CDialog) has its own ID (which is static, so I theoretically I can't instance the same component twice).</p>
  
  <p>I would like to know how to do something like this:</p>
  
  <pre><code>for (index = 0 to tabNumber) {
    name = "TAB"+index;
    tabCtrl.add(new CustomDialog(name, i));
  }
  </code></pre>