Print Page | Close Window

Problem with CXTPTabControl and CXTPToolBar

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=9958
Printed Date: 14 November 2025 at 8:18pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem with CXTPTabControl and CXTPToolBar
Posted By: MacW
Subject: Problem with CXTPTabControl and CXTPToolBar
Date Posted: 25 March 2008 at 12:23pm
Hi,

I have a window (derived from CWnd) which uses two "CXTPToolBar" instances, one at the top and one at the bottom. Between the toolbars, a window derived from CXTTreeCtrl is displayed. Everything works. The window is embedded in a CDialog.

Now I have added a CXTPTabControl to the dialog box. On the first tab, I use the window described above as the child window for the tab control (the only tab at this time).

When I now click on the tab, the upper toolbar in the child window seems to get the focus, and then XTP freezes solid, running loops somewhere in the Skin Manager, or the focus handling code. This happens every time I click on the tab control.

The problem goes away when I temporarily remove the toolbar from the window I use as the child window for the tab control...

Any idea?





Replies:
Posted By: MacW
Date Posted: 27 March 2008 at 1:08pm
Since this issue was urgent but I got no reply, I took the long road to solve it. Just in case somebody else runs into the same troubles.

My guess is that this has to do with how CJ internally handles focus changes in tab controls and toolbars, and this causes the toolkit to grind to a halt somewhere inside.

My solution was to change the architecture of my window. Instead of just adding two CXTPToolbar instances, I have derived my window from CXTPCommandBarsSiteBase<CWnd> and then searched the samples to find out how to make it work.
As usual, the documentation provided by Codejock was useless to figure out even the simplest things. And no, the source code does not always replace a proper documentation! How much time is wasted by that...

Anyway, I'm happy to say that the endless loop is gone, and the tab controls and toolbars work together now.





Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net