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 » OnTabWndSelectionChange and SetFocus Collapse All
Subject Author Date
Raffaele Cappelli Mar 21, 2006 - 3:31 AM

The CExtTabPageContainerWnd sets the focus to the new page in OnTabWndSelectionChange(). This is in general useful and needed, but if the program is not the foreground application and the page selection is automatically changed (not by the user, but by the program itself), the result is stealing the focus to the foreground application.
I think this can be fixed ExtTabPageContainerWnd.h by replacing

::SetFocus( hWndNew );

with

if (::GetFocus()) // only if the focus is in one of the calling thread windows
::SetFocus( hWndNew );

Please let me know what do you think.

Technical Support Mar 21, 2006 - 12:03 PM

Thank you for this suggestion. You are absolutely right. We changed this behavior in the CExtTabPageContainerWnd and CExtPageNavigatorWnd classes. The final release of Prof-UIS 2.53 is already available in the download section (though we are still in the process of modifying the related website content).