Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

About CTabCtrl in VC6

Status
Not open for further replies.

youssef

Programmer
Mar 13, 2001
96
BE
Hi,

I would like to use the CTabCtrl in my project.
I find many Derived Class for use but I am not satisfie because I don't understand the all sample.

I create in a CTabCtrl in a Dialog.
I create the member variable for the CTabCtrl (m_tab).
I can with m_tab.InsertItem(0,_T("TAB13)) create 3 TABs.
I use with handler (TCN_SELCHANGE) from CTabCtrl for selecting the TAB but my problem is :

- How I do to appear a Dialog in the TAB ?

It is possible to explain how I do it ?

Thanks

Best regards
 
You can't do it. But you can make your tab to appear in your dialog. John Fill
1c.bmp


ivfmd@mail.md
 
Set the controls parent your dialog wnd handle. I believe there should be some SetParent functions. Your controls stile should be WS_VISIBLE|other_styles. Instantiate your control in handling dialogs WM_CREATE. It means overwrite function OnCreate. John Fill
1c.bmp


ivfmd@mail.md
 
Hi,

I create a TabControl.

All is ok but now I would like to passe some data from one page to another.

I create in ClassView in my dialogBox a member variable with the class of the TAB PAGE 1 : CTab1 and the name m_Tab1.

When I would like to write my data from the TAB PAGE 1 to my dialogBox, nothing.

for exemple :

TAB PAGE 1 :
A EditBox : m_edit1;


DialogBox :
A EditBox : m_test;
And I creat a member Variable for TAB PAGE 1 to the DialogBox: CTab1 m_Tab1;

In DialogBox I write :

m_test = m_Tab1.m_edit1;
UpdateData(FALSE);

If anyone can help me

Best regards


 
try something as:

RECT rc;
rc.bottom=100;
rc.left=10;
rc.right=100;
rc.top=100;
x.Create(WS_THICKFRAME|WS_VISIBLE|ohterstyles,rc, this,100);
where x is
CTabCtrl x;
You should also insert items in the control x. John Fill
1c.bmp


ivfmd@mail.md
 
Hi,

Excuse-me but I don't understand

I would like to send a data from the m_edit1 to m_test


Best Regards
 
Oh, I didn't understand you correctly. If you are attentive, some controls you put in the tab control are children of the tab now, not dialog's children. When doing that you should forget about dialog box. Use your tab control instead of dialog box. John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top