Adding dialogs as pages to a WTL::CTabCtrl
"addicted2freefall" <addicted2freefall-/[email protected]>
| Newsgroups | gmane.comp.windows.wtl |
|---|---|
| Message-ID | <[email protected]> |
I've created a WTL dialog application, and added a CTabCtrl to the CMainDlg, in order to house the main interface categories, which I've implemented as borderless, child dialogs.
I've created the child dialog(s) as having the tab control as the parent window:
m_StreamPage.Create( m_tabCtrl, m_rectTabCtrl );
m_StreamPage.SetWindowLongW( GWL_STYLE, WS_CHILD );
m_StreamPage.ShowWindow(SW_SHOW);
But I can't seem to position the dialogs after creation time - they always appear over the top of the tab controls, and I can't move them down. I call this function below to attempt to position the child dialogs, but they never move.
void CMainDlg::SetTabClientRectangle()
{
RECT tabRect, itemRect;
m_tabCtrl.GetItemRect(0, &itemRect);
m_tabCtrl.GetClientRect(&tabRect);
tabRect.top += itemRect.bottom + 2;
tabRect.bottom -= 1;
m_StreamPage.SetWindowPos(m_tabCtrl.m_hWnd, &tabRect, SWP_SHOWWINDOW);
}
I think I may be failing to remove a window style from the child dialog after it's initially created.
All insights greatly appreciated.
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/wtl/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/wtl/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/