I got MFC CTab control in the dialog. It is inserted using resource editor, and bunch of other controls are pasted onto it.
In the OnInitDialog() function tab is extended like this:
I got MFC CTab control in the dialog. It is inserted using resource editor, and bunch of other controls are pasted onto it.
In the OnInitDialog() function tab is extended like this:
CTabCtrl question!
zoulasc
It sure makes the code neater!
But now I got a new problem. If you can help, please try:
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=256727&SiteID=1&mode=1
Neil K.
Ok, and when I try using TCITEM structure, problem of disappearing controls is not solved:
void
CMFC02Dlg::OnTcnSelchangeTab1(NMHDR *pNMHDR, LRESULT *pResult){
}
Elizabeth Maher MS
awani
Yes you need to use TCITEM struct. And this is faster and better than your code.
rjherbein
Well I tried Tab.SetItem(number, "Title") with "number" containing a number of last item, but it didn't work, it just says:
cannot convert parameter 2 from 'CString *__w64 ' to 'TCITEMA *'In msdn, under "CTabCtrl" there is no "events" link and also I searched keyword "OnTcnSelchange" with no result so I thought it is not documented.
Thanx for the help with msdn!
Roman S. Golubin
You can obmit the delete. This adds the new entry in front of the last one:
if (selectedTab == numberOfTabs)
{
}
Aaron Winters
This notification is well documented:
http://msdn.microsoft.com/library/en-us/shellcc/platform/commctls/tab/notifications/tcn_selchange.asp frame=true
I directly see no problem.But why do you delete the last item. Just use SetItem and change the text of the last item and add a new one.
ScorpDaddy