RE: Adding dialogs as pages to a WTL::CTabCtrl

"Dick Dievendorff" <[email protected]>
Newsgroups gmane.comp.windows.wtl
Message-ID <003001cb4ab8$e4e9b330$aebd1990$@net>
I converted my tabbed dialog application to a property sheet because I
needed the tabs themselves to be tab stops, which was necessary to have them
spoken by a screen reader.

 

Before doing that my blind users were having difficulties.  I learned a lot
working with them!

 

I disabled and hid the property sheet buttons and then expanded the tab
control within the property sheet to cover over where the buttons used to
be.

 

Dick

 

 

 

From: [email protected] [mailto:[email protected]] On Behalf Of
addicted2freefall
Sent: Thursday, September 02, 2010 8:32 AM
To: [email protected]
Subject: [wtl] Adding dialogs as pages to a WTL::CTabCtrl

 

  

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.





[Non-text portions of this message have been removed]



------------------------------------

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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.