Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Problem with CXTPTabControl and CXTPToolBar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem with CXTPTabControl and CXTPToolBar

 Post Reply Post Reply
Author
Message
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post Topic: Problem with CXTPTabControl and CXTPToolBar
    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?


Back to Top
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post 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.


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.