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 Tech Support » Bug in tabs in 2.87 Collapse All
Subject Author Date
Offer Har Oct 21, 2009 - 4:04 AM

Hi,


I have a tab control object in a dialog (CExtTabPageContainerWnd). In 2.84 This call in OnInitDialog returned the tab window so I could update the tab’s attributes:



CExtTabWnd* pTabWnd = m_tab.GetSafeTabWindow();


The same code in 2.87 returns NULL, so I cannot set the attributes of the tabs anymore.


Please fix.


Thanks,


Ron.

Technical Support Oct 22, 2009 - 12:45 PM

The CExtTabPageContainerWnd control now creates the tab window dynamically. For example, it’s created when the first page window is inserted into the tab page container. This is needed for avoiding conflicts with MFC window creation hooking mechanism. You can invoke the GetSafeTabWindow() API after page insertions.

Offer Har Oct 22, 2009 - 1:08 PM

Dear Support,


1. This is very problematic, as it breaks down a lot of already working code we have in many product. We moved to 2.87 only because the grid printing in 2.84 has bugs.


2. If I want the tab to be on top and have a close button, I don’t want to do it after the tab is added, I want to do it before - it does not make sense to have the tab created on the bottom just to move it up in the next line of code.


3. We have a dynamic tabs mechanism - the user can add and remove tabs as we wants. What will happen if he removes all the tabs? will you destroy the CExtTabPageContainerWnd’s CExtTabWnd ? will we have to add special handling for this case and re-initialize the CExtTabPageContainerWnd’s CExtTabWnd each time the last tab was removed and a new one is added?


4. Will this affect the MDI tab container as well?


I urge you to remove this feature or at least give a different mechanism for storing tab attributes inside the CExtTabPageContainerWnd and pass them to the CExtTabWnd yourself, when you create it so that existing code will not break and crash.


Thanks,


Ron.

Technical Support Oct 23, 2009 - 12:40 PM

We agree that such improvements must be 100% compatible with the previous code versions. This improvement is related to the tab page containers only. It’s not related to simple and MDI tab controls. We found the solution which makes the new tab page containers compatible with previous. Please update the source code for the following method:

CExtTabWnd * CExtTabPageContainerWnd::GetSafeTabWindow()
{
	ASSERT_VALID( this );
	VERIFY( _CreateHelper() );
	if( m_pWndTab == NULL )
		return NULL;
	ASSERT_VALID( m_pWndTab );
	if( m_pWndTab->GetSafeHwnd() == NULL )
		return NULL;
	return m_pWndTab;
}