Construct your tabbed dialog using CAcUiTabMainDialog for the main dialog frame and CAcUiTabChildDialog for each tab. In the OnInitDialog() or constructor of the CAcUiTabMainDialog immediately call SetDialogName() with the published name of your extensible dialog. ObjectARX applications will use this name to add tabs to your dialog. After you add your tabs with calls to AddTab(), in OnInitDialog, call AddExtendedTabs(). Remember that your tabbed dialog can have any number of added tabs in it, so do not assume a fixed number of tabs elsewhere in the dialog's code.
For example:
BOOL CPrefTabFrame::OnInitDialog() // Dialog initialization for my tabbed dialog frame. { SetDialogName("Preferences"); CAcUiTabMainDialog::OnInitDialog(); ... // Add my tabs here. m_tab.AddTab(0,IDS_FILES_TABNAME,IDD_FILES_TAB,&m_filesTab); m_tab.AddTab(1,IDS_PERF_TABNAME,IDD_PERF_TAB,&m_performTab); m_tab.AddTab(2,IDS_COMP_TABNAME,IDD_COMP_TAB,&m_compatTab); // Add any extended tabs. This call is what makes this // dialog tab extensible AddExtendedTabs(); }