Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » How to create Tab control using Prof-UIS Collapse All
Subject Author Date
Jayender S May 25, 2006 - 11:36 PM

Hi ,
I have worked in creating different Tab control , but how to do it using PRof-Uis ?
like i added " CExtToolControlBar " and when inserting item , i get this error
" ’InsertItem’ : is not a member of ’CExtToolControlBar’ "
why is it ? and how to solve this ?
waiting for ur response,
Thanks,
Jayender

wang joy Jan 19, 2009 - 6:48 PM

Is the free version not support this CExtTabWnd class ?

Technical Support May 26, 2006 - 2:54 AM

The tab window is implemented in the CExtTabWnd class -- not in CExtToolControlBar. The CExtTabWnd class has the ItemInsert() method.

If you need something like the standard propery sheet control in the tabbed mode, then you should use the CExtTabPageContainerWnd class which has the PageInsert() method.

Jayender V S May 26, 2006 - 3:02 AM

Well thanks for the replay .. but i tried with ’CExtTabWnd’, but again it says the error

error C2039: ’InsertItem’ : is not a member of ’CExtTabWnd’

why is that ? what am i suppose to add ?
waiting for ur reply ..

thanks,
Jayender

Technical Support May 26, 2006 - 3:19 AM

We are sorry. The CExtTabWnd does not have the InsertItem() method, but it has ItemInsert().

Jayender V S May 26, 2006 - 3:34 AM

Well , i kner this .. even i tried this:
like
tabItem.pszText = _T(" &Tab1 ");
m_cTab.ItemInsert(0,&tabItem);

this is the error :
error C2664: ’ItemInsert’ : cannot convert parameter 2 from ’struct tagTCITEMA’ to ’struct HICON__ *’

what is the issue here ?

Jayender V S May 26, 2006 - 3:55 AM

I tried like this
m_cTab.ItemInsert("Tab1");
m_cTab.ItemInsert("Tab2");
.. am able to display the tab but when i click it there is no event takes place .
why ?

Technical Support May 26, 2006 - 7:22 AM

The TCITEM structure defined in Win32 API relates to the standard Windows tab common control and the CTabCtrl class in MFC. It ahs nothing to do with the CExtTabWnd class in Prof-UIS. We guess the m_cTab variable in your message is of the CTabCtrl type. Just use the CExtTabWnd instead.

Jayender V S May 26, 2006 - 3:57 AM

Well this could be the reason :
ShowWindowNumber(m_cTab.GetCurFocus());
here is the error :
error C2039: ’GetCurFocus’ : is not a member of ’CExtTabWnd’
what is that used insead of ’GetCurFocus’ ?

Technical Support May 26, 2006 - 7:24 AM

Unfortunately we still do not know any details about m_cTab, GetCurFocus and ShowWindowNumber.

Jayender V S May 26, 2006 - 7:35 AM

Here :
CExtTabWnd     m_cTab;
and here i use
void CTabcontrolDlg::OnSelchangeTab1(NMHDR* pNMHDR, LRESULT* pResult)
{
    ShowWindowNumber(m_cTab.GetCurFocus());
}

GetCurFocus is for when i change the tab control .

Technical Support May 26, 2006 - 9:06 AM

As we said earlier you need to use the CExtTabPageContainerWnd class instead of CExtTabWnd. The CExtTabWnd class is a simple tab strip and it is not designed for containing any child windows. You can read about how to handle the tab selection event in the FAQ How can I know when a tab is clicked?. The currently selected page can be retrieved with the CExtTabPageContainerWnd::PageSelectionGet() method. Please note you can find information about all the CExtTabPageContainerWnd methods in the Prof-UIS Help.