How to instanciate same dialog in MFC C++?
===

I want to build a MFC dialog in which I add a simple `TabControl`. I want my tab pages to be instances of the same `CDialog`, but with some different parameters (such as which buttons are shown, for example).

I am using Visual Studio 2008.

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).


I would like to know how to do something like this:

    for (index = 0 to tabNumber) {
      name = "TAB"+index;
      tabCtrl.add(new CustomDialog(name, i));
    }