Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Tookkit 9.70 & vs2010
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Tookkit 9.70 & vs2010

 Post Reply Post Reply
Author
Message
rhuros View Drop Down
Newbie
Newbie


Joined: 02 February 2010
Location: United Kingdom
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote rhuros Quote  Post ReplyReply Direct Link To This Post Topic: Tookkit 9.70 & vs2010
    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
 
 
Back to Top
wssdev View Drop Down
Groupie
Groupie


Joined: 04 May 2010
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote wssdev Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post 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/
Back to Top
wssdev View Drop Down
Groupie
Groupie


Joined: 04 May 2010
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote wssdev Quote  Post ReplyReply Direct Link To This Post 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.


Back to Top
rhuros View Drop Down
Newbie
Newbie


Joined: 02 February 2010
Location: United Kingdom
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote rhuros Quote  Post ReplyReply Direct Link To This Post 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 
Back to Top
wssdev View Drop Down
Groupie
Groupie


Joined: 04 May 2010
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote wssdev Quote  Post ReplyReply Direct Link To This Post 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.


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.107 seconds.