CTabCtrl.
parent dialogs.
I'm sorry but there is no other way to get around this problem other
than
what I suggested. The controls or the child dialog have to be a child
of
the tab control. Good luck with the transparent background thing:
Here
is
an article I wrote about transparent static, you can see what is
required
to
get that to work!
http://www.codeproject.com/KB/static/TransparentStaticCtrl.aspx
And here is how you would make a listbox transparent, which again will
not
apply to a tab control.
http://www.codeproject.com/KB/combobox/TransListBox.aspx
I don't know why you don't want to make the controls children of the
tab.
but it is easy you can simply call SetParent on the child controls to
change
their parent to the tab control!
BOOL CMyDialogWithTab::OnInitDialog()
{
CDialog::OnInitDialog();
m_Child1.SetParent(&m_TabCtrl);
m_Child2.SetParent(&m_TabCtrl);
...
}
or if you are putting all your controls in a dialog box and then
putting
it
in the tab:
BOOL CMyDialogWithTab::OnInitDialog()
{
CDialog::OnInitDialog();
m_ChildDlg.Create(CMyChildDlg::IDD,&m_TabCtrl);
...
}
AliR.
"Peter" <Peter@discussions.microsoft.com> wrote in message
news:08922225-B6C7-4154-87D0-4016C6CC2B9D@microsoft.com...
I understand what do you recommend.
Problem is that in this application is not so simple process to
adjust
it
by
your recommendation.
The most simple should be to set CTabCtrl background transparent and
then
forget
it forever.
How can I set transparent background in CTabCtrl ?
Or how to make functional "Transparent" property of CTabCtrl in
resource
editor ?
Peter
"AliR (VC++ MVP)" wrote:
You should make the child controls/dialog children of the tab
control
instead of the main dialog, that way the tab control will never go
on
top
of
the controls.
Normally one would put the controls to go on a tab in a dialog box
(Child
Dialog, not popup), and remove the border, and then create that
dialog
as
the child of the tab control.
Planty of examples on codeproject.com
AliR.
"Peter" <Peter@discussions.microsoft.com> wrote in message
news:0E3B65C2-013B-4C37-BDBA-9C2CE2580677@microsoft.com...
Hi,
I am trying to add CTabCtrl into my modeless dialog.
I want to have all other buttons, editboxes, checkboxes placed on
dialog
surface
and only to change values for controls by active tab on my
CTabCtrl.
So for all active tabs there are the same controls, only values
are
changed.
I draw CTabCtrl in resource editor to include all dialog controls
with
exception of OK and Cancel buttons.
Problem is when CTabCtrl redraws itself then some dialog controls
stays
hidden.
I tried "Transparent" property in resource editor, but no
success.
How can I enable that CTabCtrl will have transparent background
to
see
always all controls which are directly on dialog surface ?
Or any other tip ?
Peter