Click to See Complete Forum and Search --> : cTabCtrl & multiline (2)


pegase
April 21st, 1999, 04:07 AM
hello,

is it possible to customize the number of tab on one row into multiline context ?

And, thus do as if it was like a carriage control on the end of each line !!!!

Actually, i use space to display what i want. I'd would like to do by in other way !

Here is Now how i do, I use a string table for each title :

IDS_STR_TAB_TITLE1 = "....title1..."
(where '.' == space)
IDS_STR_TAB_TITLE2 = "....title2..."
IDS_STR_TAB_TITLE3 = "title3"
IDS_STR_TAB_TITLE4 = "title4"
etc...
and
IDS_STR_TAB_TITLE7 = "..........title7..........."

BOOL CAdmDlg::OnInitDialog()
{
(CTabCtrl m_TabControl)
CString Label;
TCITEM tcItem;

CDialog::OnInitDialog();
// Tab labels
Label.LoadString(IDS_STR_TAB_TITLE1);
tcItem.pszText = Label.GetBuffer(0);
m_TabControl.InsertItem(TAB_TITLE1, &tcItem);

Label.LoadString(IDS_STR_TAB_TITLE2);
tcItem.pszText = Label.GetBuffer(0);
m_TabControl.InsertItem(TAB_TITLE2, &tcItem);

Label.LoadString(IDS_STR_TAB_TITLE3);
tcItem.pszText = Label.GetBuffer(0);
m_TabControl.InsertItem(TAB_TITLE3, &tcItem);

...

}

For my example :
2 tabs in line 1
4 tabs in line 2
and 1 tab in line 3

-----------------------
|....title1...|....title2...|
---------------------
|title3|title4|title5|title6|
-----------------------
|..........title7...........|
-----------------------
|...........................|
|..........into............|
|...........................|
|...........................|
|.........cDialog.......|
|...........................|
|.........Windows....|
|...........................|
|...........................|
|...........................|
|...........................|
|...........................|
----------------------

thinks for your answer and idea