Hello. I have a tab control with the TCS_MULTILINE style.
I use the following code in which all the tabs fit into one line:


.ELSEIF iMsg==WM_INITDIALOG
;---------- [Set up the tab control:] ----------
invoke GetDlgItem,hWndDlg,IDC_STATTABS ; We get the handle to the Tab Control.
mov hWndStatTab,eax

mov tci.imask,TCIF_TEXT

mov tci.pszText,OFFSET szStatTab1
invoke SendMessage,hWndStatTab,TCM_INSERTITEM,0,ADDR tci ; Add first tab.

mov tci.pszText,OFFSET szStatTab2
invoke SendMessage,hWndStatTab,TCM_INSERTITEM,1,ADDR tci ; Add second tab.

mov tci.pszText,OFFSET szStatTab3
invoke SendMessage,hWndStatTab,TCM_INSERTITEM,2,ADDR tci ; Add third tab.




;---------- [Create dialogs that will fit in the tab control:] ----------
mov eax,OFFSET TabChildDlgProc
invoke CreateDialogParam,hInstance,IDD_STATS_TAB1,hWndStatTab,eax,0
mov TabChild1hWnd,eax

mov eax,OFFSET TabChildDlgProc
invoke CreateDialogParam,hInstance,IDD_STATS_TAB2,hWndStatTab,eax,0
mov TabChild2hWnd,eax

mov dwTabChosen,0 ; Initialise to 0 since we will start showing the first child.
invoke ShowWindow,TabChild1hWnd,SW_SHOWDEFAULT ; Show the recently created child dialog box.


Which works as expected. However, if I add an extra tab so that the tabs are on two lines the dialog "TabChild1hWnd" does not show. So when I open my dialog box the tab control looks empty. I have tried altering the order I add the tabs etc but I can't get the child dialog to show when I have more than one line of tabs. Suggestions please?
Thanks :-)
Posted on 2004-08-25 08:31:04 by adamjjackson
Hi...

First go to ----->http://msdn.microsoft.com/library/en-us/shellcc/platform/commctls/tab/reflist.asp

I think perhaps you forgot to put
TCS_MULTISELECT
Version 4.70. Multiple tabs can be selected by holding down when clicking. This style must be used with the TCS_BUTTONS style.


go and see ---->http://msdn.microsoft.com/library/en-us/shellcc/platform/commctls/tab/styles.asp#TCS_MULTILINE

I hope you will foind your life in these links...

Gerard--
----
"Optimism is a false hope for the use of cowards and imbeciles"
(Me and others well thinking person)
Posted on 2004-08-28 02:41:00 by gerard