Not show the dialog with Report ctrl. |
Post Reply |
Author | |
mtsanji
Newbie Joined: 17 August 2005 Location: Japan Status: Offline Points: 4 |
Post Options
Thanks(0)
Posted: 16 January 2006 at 2:59am |
Hi, The dialog that include "Report" control doesn't display, if I use the resorce dll which I created for local use. So far, I found that if I register the "Instance handle" and "Resouce Handle" to the windows class in CXTPReportControl::ResigterWindowClass, this problem does not occur. (Please see the code below) Do I have to do some thing special if I want to use the external resource file? Thanks, Sanji *1). I attach the code to see the problem. 2006-01-16_025026_Sample.zip (See the "readme.txt") *2). If I made the following changes to "CXTPReportControl" (see below), the dialog displays. ---------------------- // <<<< Added following code... >>>> return TRUE; |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
in last versions we added parameter
to allow call it with another instance. I can only suggest you to change sources now. |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Hi Sanji,
There is no need to change library source by yourself. In this case just change the following string in your Sample.cpp: if (NULL != hRes) AfxSetResourceHandle(hRes); to XTPResourceManager()->SetResourceHandle(hRes); Please note that the ReportControl (and others) use XTPResourceManager to load resources instead of MFC or API functions. For more details see CXTPResourceManager class documentation. -- Best regards, Serge |
|
mtsanji
Newbie Joined: 17 August 2005 Location: Japan Status: Offline Points: 4 |
Post Options
Thanks(0)
|
Hi Oleg and Serge, Thank you for your help. If I add the CReportControl::RegisterWindowClass(<resouce handle>) to the dialog constructer and the dialog is displayed. I tried to change the source code to use 'XTPResourceManager()->SetResourceHandle(hRes)' instead of the above but, it didn't work. It seems that the application cannot replace the resource handle. sample: 2006-01-17_014739_Sample.zip Is there any way to solve this problem except using the new RegisterWindowClass? Thank you. Sanji. * Sorry for the attached "readme.txt" that included Japanese charactors...
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Just call RegisterWindowClass in constructor of dialog. Think you don't need to call XTPResourceManager()->SetResourceHandle |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
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 |