![]() |
Problem with CXTPTabControl and CXTPToolBar |
Post Reply
|
| Author | |
MacW
Senior Member
Joined: 26 June 2007 Status: Offline Points: 253 |
Post Options
Thanks(0)
Quote Reply
Topic: Problem with CXTPTabControl and CXTPToolBarPosted: 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? |
|
![]() |
|
MacW
Senior Member
Joined: 26 June 2007 Status: Offline Points: 253 |
Post Options
Thanks(0)
Quote Reply
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. |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |