[solved] Problem with docking pane icons v18.0.1 |
Post Reply |
Author | |
lviolette
Groupie Joined: 17 March 2007 Location: United States Status: Offline Points: 62 |
Post Options
Thanks(0)
Posted: 29 November 2016 at 4:56pm |
We have an SDI App that hosts in a DLL the mainframe and UI. When we updated to CodeJock 17.2 from 15, the code that controls the drawing of docking pane icons, like the Pin and Close buttons changed to be resource based. You can see the new code in XTPDrawhelpers::InitFont which gets called by XTPPrimitiveDrawer::DrawSymbol. What happens is that InitFont gets called and my DLL is the current thread module (not the application EXE). So, when InitFont calls AfxFindResourceHandle, it does not succeed in loading the ToolkitPro DLL and is not able to find XTP_IDC_FONT_CODEJOCK. Thus, an ASSERT. I have created a sample application/dll that demonstrates this problem. Basically the docking pane icons look like this: Instead of this: To show that the icon should be here, here's what it looks like when I hover over where the icon should be: I have created a sample visual studio project that re-creates the problem. You can extract it with WinRAR. If you extract it so that the root folder is under the CodeJock\Samples folder, it "should" build the DLL and EXE to the correct CodeJock\bin folder. Would appreciate if you have any advice.
|
|
L. Violette
Monolith www.lith.com Xtreme Toolkit Pro v22.1.0 |
|
Recomatics
Newbie Joined: 09 March 2017 Status: Offline Points: 16 |
Answer Post Options Thanks(2) |
Same problem here ,
changed the code of the ..\Source\Common\XTPDrawHelpers.cpp to : ... void CXTPPrimitiveDrawer::InitFont() { AFX_MANAGE_STATE(AfxGetAppModuleState()); if (NULL == m_hCodejockMemFont) { ::EnterCriticalSection(&m_fontAccess); if (NULL == m_hCodejockMemFont ... |
|
lviolette
Groupie Joined: 17 March 2007 Location: United States Status: Offline Points: 62 |
Post Options
Thanks(0)
|
I have confirmed that this continues to be a problem in version 17.3. It appears that you can't use dynamic linking of toolkit AND host UI in a DLL instead of an EXE.... |
|
L. Violette
Monolith www.lith.com Xtreme Toolkit Pro v22.1.0 |
|
Recomatics
Newbie Joined: 09 March 2017 Status: Offline Points: 16 |
Answer Post Options Thanks(2) |
Same problem here ,
changed the code of the ..\Source\Common\XTPDrawHelpers.cpp to : ... void CXTPPrimitiveDrawer::InitFont() { AFX_MANAGE_STATE(AfxGetAppModuleState()); if (NULL == m_hCodejockMemFont) { ::EnterCriticalSection(&m_fontAccess); if (NULL == m_hCodejockMemFont ... |
|
lviolette
Groupie Joined: 17 March 2007 Location: United States Status: Offline Points: 62 |
Post Options
Thanks(0)
|
I can confirm that adding AFX_MANAGE_STATE has fixed the issue for us.
|
|
L. Violette
Monolith www.lith.com Xtreme Toolkit Pro v22.1.0 |
|
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(1)
|
Hello Recomatics,
Your solution was introduced in CXTPPrimitiveDrawer::InitFont(). Thank you. Regards, Oleksandr Lebed |
|
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 |