This class needs the following code in OnInitDialog()
mytab = new CMyTab;
mytab->Create( CMyTab::IDD, &tabCtrl);
tabCtrl.AddTab( mytab, "A new tab",0);
mytab->tabCtrlPtr = &tabCtrl;
I think there is a lot of redundancy in this and if you have a lot of tabs
keeping up with the pointers to CMyTab classes is a bit of a hasle.
What I want is to have simple statements like this:
tabCtrl.AddTab<CMyTabNew>("A new tab",0);
tabCtrl.AddTab<CMyTabLast>("The last tab",0);
where CMyTab... are the classes for the forms that are going to be
displayed in the Tab Control.
My solution adds the following member to CXTabCtrl
I'm pretty sure I've entered everything in right and my program builds and runs, but I have no tabs on my tab control.
I'm writing an SDI app with a formview in a splitter window,
and I can see the tab control in my formview and everthing, but I have no tabs.
I'm still kinda new to MFC and any kind of help would really be appreciated.
I use your CXTabCtrl class, which is really good, but I have a problem to use it into DLL.
In fact, it's when the application runs the DoDataExchange function, the GetDlgItem doesn't. I tried to use an independant pointer, and not a Claas member of AppWizzard, but the problem is the same : GetDlgItem returns NULL pointer.
If you got a soution, It would be really great. Otherwise, tell it to me.