Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTPReportPaintManager Assert: 10.3.1 Upgrade
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPReportPaintManager Assert: 10.3.1 Upgrade

 Post Reply Post Reply
Author
Message
robosport View Drop Down
Groupie
Groupie


Joined: 20 June 2005
Location: United States
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote robosport Quote  Post ReplyReply Direct Link To This Post Topic: CXTPReportPaintManager Assert: 10.3.1 Upgrade
    Posted: 29 September 2006 at 5:41am
I just upgraded from '06 Q2 to 10.3.1. Everything compiled and linked fine.
 
When I launch my app I receive a series of assertion failures (if I ignore it keeps coming back about a dozen times). Same place everytime.
 
XTPReportPaintManager.cpp, line 105
 
VERIFY(XTPResourceManager()->LoadBitmap(&bmp, XTP_IDB_REPORT_GLYPHS));
 
I noticed the check boxes on report views are missing, and the report specific cursors, like resize column, which makes sense given the assert.
 
Has something changed that I did not see in forum searching and release notes, or did I miss something during the upgrade? FYI... I'm linking static XTP for use with MFC DLL, in case it matters. i.e using #define _XTP_STATICLINK prior to the include. Also, I'm still including <XTToolkitPro.rc> in rc2.
 
Thanks!
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 29 September 2006 at 9:32am

Hello,

Just checked - all work as expected. Check yur rc2 file. Try to rebuild all project.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
robosport View Drop Down
Groupie
Groupie


Joined: 20 June 2005
Location: United States
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote robosport Quote  Post ReplyReply Direct Link To This Post Posted: 29 September 2006 at 11:36am

Found it! Somehow during the update (don't ask me how) the _AFXDLL preprocessor define was misplaced.

Thanks again for a terrific product!
Back to Top
SunMarc View Drop Down
Newbie
Newbie
Avatar

Joined: 19 October 2006
Location: France
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote SunMarc Quote  Post ReplyReply Direct Link To This Post Posted: 19 October 2006 at 6:17am
I have the same configuration (I'm linking static XTP for use with MFC DLL) and I get exactly the same pb 
(Everything compiled and linked fine).

I'm including <XTToolkitPro.rc> in my rc2.
I'm using _USRDLL preprocessor define for my Dll project.
I tried to use _AFXDLL but it doesn't work with MFC in static library.

Please Help...

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 19 October 2006 at 8:58am
Hi,
Show call stack of assert message.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
SunMarc View Drop Down
Newbie
Newbie
Avatar

Joined: 19 October 2006
Location: France
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote SunMarc Quote  Post ReplyReply Direct Link To This Post Posted: 20 October 2006 at 4:21am
Call stack...

>    EffectManager.dll!CXTPReportPaintManager::CXTPReportPaintManager()  Ligne 93 + 0x4c octets    C++
     EffectManager.dll!CXTPReportControl::CXTPReportControl()  Ligne 101 + 0x36 octets    C++
     EffectManager.dll!CEMReportCtrl::CEMReportCtrl()  Ligne 145 + 0x4a octets    C++
     EffectManager.dll!CEMLayersDlg::CEMLayersDlg(CWnd * pParent=0x00000000)  Ligne 17 + 0x123 octets    C++
     EffectManager.dll!CEffectManagerDlg::CEffectManagerDlg(CEffectManager * pManager=0x010f6548, CWnd * pParent=0x00000000)  Ligne 22 + 0xbd octets    C++
     EffectManager.dll!CEffectManager::ShowDialog(int iMode=0)  Ligne 269 + 0x31 octets    C++
     TestEM.exe!CTestEMDlg::OnBnClickedStartEm()  Ligne 270    C++
     TestEM.exe!_AfxDispatchCmdMsg(CCmdTarget * pTarget=0x0079c8dc, unsigned int nID=1000, int nCode=0, void (void)* pfn=0x004dfbce, void * pExtra=0x00000000, unsigned int nSig=56, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000)  Ligne 82    C++
     TestEM.exe!CCmdTarget::OnCmdMsg(unsigned int nID=1000, int nCode=0, void * pExtra=0x00000000, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000)  Ligne 381 + 0x27 octets    C++
     TestEM.exe!CDialog::OnCmdMsg(unsigned int nID=1000, int nCode=0, void * pExtra=0x00000000, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000)  Ligne 85 + 0x18 octets    C++
     TestEM.exe!CWnd::OnCommand(unsigned int wParam=1000, long lParam=66938)  Ligne 2300    C++
     TestEM.exe!CWnd::OnWndMsg(unsigned int message=273, unsigned int wParam=1000, long lParam=66938, long * pResult=0x0012f8d0)  Ligne 1755 + 0x1e octets    C++
     TestEM.exe!CWnd::WindowProc(unsigned int message=273, unsigned int wParam=1000, long lParam=66938)  Ligne 1741 + 0x20 octets    C++
     TestEM.exe!AfxCallWndProc(CWnd * pWnd=0x0079c8dc, HWND__ * hWnd=0x00010574, unsigned int nMsg=273, unsigned int wParam=1000, long lParam=66938)  Ligne 240 + 0x1c octets    C++
     TestEM.exe!AfxWndProc(HWND__ * hWnd=0x00010574, unsigned int nMsg=273, unsigned int wParam=1000, long lParam=66938)  Ligne 389    C++


It's in the CXTPReportPaintManager constructor :
VERIFY(XTPResourceManager()->LoadBitmap(&bmp, XTP_IDB_REPORT_GLYPHS));

Back to Top
SunMarc View Drop Down
Newbie
Newbie
Avatar

Joined: 19 October 2006
Location: France
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote SunMarc Quote  Post ReplyReply Direct Link To This Post Posted: 20 October 2006 at 4:31am
I tried to compile the same project as a static library and it works fine.

It's  probably due to a compilation option...

Thanks

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 20 October 2006 at 4:54am

I see that you moved code to EffectManager.dll, so all resources must be in this dll +

Call XTPResourceManager()->SetResourceHandle(EffectManagerHandle); in this dll.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
SunMarc View Drop Down
Newbie
Newbie
Avatar

Joined: 19 October 2006
Location: France
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote SunMarc Quote  Post ReplyReply Direct Link To This Post Posted: 23 October 2006 at 8:30am
Thank you for your answer but it doesn't change anything...
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 23 October 2006 at 9:04am
Set breakpoint to this line
VERIFY(XTPResourceManager()->LoadBitmap(&bmp, XTP_IDB_REPORT_GLYPHS));
step into, and check what instance used to load bitmap. Add resources to dll /exe for this instance
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
SunMarc View Drop Down
Newbie
Newbie
Avatar

Joined: 19 October 2006
Location: France
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote SunMarc Quote  Post ReplyReply Direct Link To This Post Posted: 23 October 2006 at 9:53am
Thank you, it works if I add :
XTPResourceManager()->SetResourceFile(_T("ToolkitPro1030vc80.dll"));
in my dll.

But is there a way to add the resources in my DLL without using the
XTP dll (just adding the <XTToolkitPro.rc> in my rc2 is not enough...)



Back to Top
SunMarc View Drop Down
Newbie
Newbie
Avatar

Joined: 19 October 2006
Location: France
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote SunMarc Quote  Post ReplyReply Direct Link To This Post Posted: 23 October 2006 at 11:11am
My pb only appears when using a CXTPReportControl...
No pb with other controls...

So, two issues for me :

- using XTPResourceManager()->SetResourceFile(_T("ToolkitPro1030vc80.dll"));
but I have to work with the XTP dll...

- Do not use CXTPReportControl in a DLL including XTP...

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 23 October 2006 at 1:18pm
Hello,
Problem is obvious for me. if resoures are found in toolkitPro but not in your dll it only means that there are no resources in your dll.
Thats it.
 
Check Workspace\ToolkitPro\ToolkitPro.cpp
and Workspace\ToolkitPro\ToolkitPro.rc
and make same.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
mattrmiller View Drop Down
Newbie
Newbie


Joined: 29 November 2006
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote mattrmiller Quote  Post ReplyReply Direct Link To This Post Posted: 30 November 2006 at 2:01am
I had this exact problem, and adding <XTToolkitPro.rc> to my resource file fixed it. I know you said that it didn't work or you.. but give it a go again and see if it works. Make sure you add it to the top and the bottom... right below anywhere you see "afxres.rc".

Once you have compiled you can confirmed it work by using a program like Resource Hacker (http://www.angusj.com/resourcehacker/) to see if the resources are in your DLL or EXE.
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.125 seconds.