Print Page | Close Window

Tookkit 9.70 & vs2010

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=16122
Printed Date: 21 June 2025 at 2:34am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Tookkit 9.70 & vs2010
Posted By: rhuros
Subject: Tookkit 9.70 & vs2010
Date Posted: 02 February 2010 at 5:35am
Hiya,
 
Have already done a search through the forums on this, and turned up nothing (not really surprising as the version of XTP is that old).
 
Anyway the issue I have is that we are converting our UI and related items to VS2010 because of other benifits that it may give.  However this has turned up an issue with the version of Toolkit Pro that we are using.
 
Basically all windows, docking panes etc. are being created correctly however they are not being displayed.  This became apprent when we recompiled the 9.70 source that we have in VS2010 and used the binaries with our app.
 
The strange thing is that this worked in VS2008 with no change....
 
Relavent Details are
 
XTP 9.70
VS2010 beta 2
Unicode static build.
And as far as I know no changes made to the source what-so-ever, were only rebuild as the binaries would not run with a VS2010 build of our app...
 
Thanks for any help you might be able to give.
 
Cheers
 
Ian
 
 



Replies:
Posted By: wssdev
Date Posted: 04 May 2010 at 10:55am
Hi,

Did you find a solution for this issue? We are facing the same problem with XTP 10.31 and VS2010 RTM.

Cheers,
Vladimir



Posted By: znakeeye
Date Posted: 05 May 2010 at 4:09am
I would suspect that the projects were converted erroneously by VS 2010. Perhaps some WINVER or other necessary predefinition got lost?
 
Don't trust the project converter!


-------------
PokerMemento - http://www.pokermemento.com/


Posted By: wssdev
Date Posted: 05 May 2010 at 4:24am
We had to modify WINVER anyway, since the samples are very old. At this moment, WINVER, _WIN32_WINNT and _WIN32_WINDOWS are all set to 0x0501 which (if I recall correctly) corresponds to XP SP2.

I do not think it has something to do with the upgrade. It's more like there's an issue with the point at which XTP hooks into MFC frame window.

The whole XTP layout framework itself seems to work. Panes get constructed, layout gets constructed, no asserts firing. Only the panes are not visible.

I would say it has to be a change in the MFC itself that caused XTP to somehow stay detached from the frame window.




Posted By: rhuros
Date Posted: 05 May 2010 at 9:51am
YEs we did find a soultion to this, in VS2010 change the project tool kit from v100 to v90.  This in effect changes the version of MFC and the MSVC runtime you are using.  It gets things to work but does stop you using newer features 


Posted By: wssdev
Date Posted: 05 May 2010 at 12:24pm
OK, I've figured it out.

CXTPDockingPaneManager (XTPDockingPaneManager.cpp) window gets created with an ID = 0.

With previous MFC versions the ID value probably did not matter. Starting with the MFC version that comes with VS2010, a child window with an ID=0 for some reason will not receive WM_SIZEPARENT messages.

This means that CXTPDockingPaneManager::OnSizeParent() never gets called and the layout -- otherwise perfectly valid -- never gets a chance to be updated.

The fix in this case was to find a line in CXTPDockingPaneManager::InstallDockingPanes() where the docking pane manager window gets created:

     if (!Create(_T("XTPDockingPaneManager"), _T(""), WS_CHILD, CRect(0, 0, 0, 0), pSite, 0))
         return false;

and to set the ID (the last argument in the above call) to a non-zero value. I'm not sure if there are any restrictions regarding what this value should be. Probably not.

Note that it's possible that there are other places where the same issue might appear. Since we use only a limited functionality from XTP, this is all that was needed to be fixed in our case.





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