我想在DialogBarControl中先加入两Tab,然后他的下面插入对话框,但现在tab显示出来了,对话框没有显示出来,希望大家给点建议,代码和截屏如下:
CRect rect;
this->GetClientRect(rect);
CTabCtrl *m_tab = new CTabCtrl();
m_tab->Create(WS_VISIBLE,rect,this,1000);
m_tab->InsertItem(0,"config");
m_tab->InsertItem(1,"object");
m_tab->GetClientRect(rect);
if(!m_wndStrategyDlg.Create(IDD_DIALOG_STRATEGY,GetDlgItem(1000)))
{
TRACE0("Failed to create sitedialog child\n");
return -1;
}
m_wndStrategyDlg.MoveWindow(rect);
m_wndStrategyDlg.ShowWindow(SW_SHOW);
CRect rect;
this->GetClientRect(rect);
CTabCtrl *m_tab = new CTabCtrl();
m_tab->Create(WS_VISIBLE,rect,this,1000);
m_tab->InsertItem(0,"config");
m_tab->InsertItem(1,"object");
m_tab->GetClientRect(rect);
if(!m_wndStrategyDlg.Create(IDD_DIALOG_STRATEGY,GetDlgItem(1000)))
{
TRACE0("Failed to create sitedialog child\n");
return -1;
}
m_wndStrategyDlg.MoveWindow(rect);
m_wndStrategyDlg.ShowWindow(SW_SHOW);
CRect rcRect;
m_tab->GetClientRect( &rcRect );
m_tab->AdjustRect(FALSE, &rcRect);
m_Page.MoveWindow(rcRect);
CRect rect;
this->GetClientRect(&rect);
CTabCtrl *m_tab = new CTabCtrl();
m_tab->Create(WS_VISIBLE,rect,this,1000);
m_tab->InsertItem(0,"ÅäÖÃ");
m_tab->InsertItem(1,"¶ÔÏó"); m_tab->GetClientRect( &rect );
m_tab->AdjustRect(FALSE, &rect);
if(!m_wndStrategyDlg.Create(IDD_DIALOG_STRATEGY),this)
{
TRACE0("Failed to create sitedialog child\n");
return -1;
}
m_wndStrategyDlg.MoveWindow(rect);
m_wndStrategyDlg.ShowWindow(SW_SHOW);
完整的代码,哪里有问题呢?
http://download.csdn.net/detail/schlafenhamster/4478966
IDD_DIALOG_STRATEGY 是否是Child属性?