CTabCtrl problem
-
Greetings, I am trying to populate a CTabCtrl in my dialog with child dialogs but I am having terrible problems with inheritance of the CWnd*. Now I assume that is what it is as the dialogs I create are spawning in their own window rather than the client window of the control. Below is snippet of my class
CTabManage::CTabManage()
{
m_tab[0]=new CDetails;
...void CTabManage::Init()
{
m_tabActive=0;m\_tab\[0\]->Create(IDD\_TAB\_DETAILS, this);
...
and here is where it is initialised
::OnInitDialog()
...
m_cTabManage.InsertItem(0, _T("Details"));m\_cTabManage.Init();
...
Any pointers would be appreciated as it has been driving me nuts.
Alan
-
Greetings, I am trying to populate a CTabCtrl in my dialog with child dialogs but I am having terrible problems with inheritance of the CWnd*. Now I assume that is what it is as the dialogs I create are spawning in their own window rather than the client window of the control. Below is snippet of my class
CTabManage::CTabManage()
{
m_tab[0]=new CDetails;
...void CTabManage::Init()
{
m_tabActive=0;m\_tab\[0\]->Create(IDD\_TAB\_DETAILS, this);
...
and here is where it is initialised
::OnInitDialog()
...
m_cTabManage.InsertItem(0, _T("Details"));m\_cTabManage.Init();
...
Any pointers would be appreciated as it has been driving me nuts.
Alan
-
Is the WS_CHILD set for you child dialogs? In the resource properties for your dialogs make sure
Style=Child
, and you probably would likeControl=True
as well.Thank you. That got it. That was the one thing I had not checked.
Alan