<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : XTPReport as Custom Control</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : XTPReport as Custom Control]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 17 Apr 2026 22:02:03 +0000</pubDate>
  <lastBuildDate>Mon, 20 Nov 2006 12:01:13 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=4572</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[XTPReport as Custom Control : Ok, it worked !Thank you very...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4572&amp;PID=17491&amp;title=xtpreport-as-custom-control#17491</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2517">jpnascim</a><br /><strong>Subject:</strong> 4572<br /><strong>Posted:</strong> 20 November 2006 at 12:01pm<br /><br />Ok, it worked !<br><br>Thank you very much.<br><br>Joćo Pedro<br><br><br>]]>
   </description>
   <pubDate>Mon, 20 Nov 2006 12:01:13 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4572&amp;PID=17491&amp;title=xtpreport-as-custom-control#17491</guid>
  </item> 
  <item>
   <title><![CDATA[XTPReport as Custom Control : Hi,  replace HINSTANCE hInst...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4572&amp;PID=17471&amp;title=xtpreport-as-custom-control#17471</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 4572<br /><strong>Posted:</strong> 20 November 2006 at 6:42am<br /><br /><P>Hi,</P><DIV>&nbsp;</DIV><DIV>replace</DIV><DIV>HINSTANCE hInst = AfxGetInstanceHandle();</DIV><DIV>&nbsp;</DIV><DIV>to</DIV><DIV>HINSTANCE hInst =&nbsp; hInstance ? hInstance : AfxGetInstanceHandle();<BR></DIV>]]>
   </description>
   <pubDate>Mon, 20 Nov 2006 06:42:43 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4572&amp;PID=17471&amp;title=xtpreport-as-custom-control#17471</guid>
  </item> 
  <item>
   <title><![CDATA[XTPReport as Custom Control : Ok, I&amp;#039;ve tried doing what...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4572&amp;PID=17462&amp;title=xtpreport-as-custom-control#17462</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2517">jpnascim</a><br /><strong>Subject:</strong> 4572<br /><strong>Posted:</strong> 20 November 2006 at 4:45am<br /><br />Ok, I've tried doing what you recommended but it still won't show up and do Modal keeps returning -1.<br><br>This is the resulting code for the RegisterWindowClass method after the changes you've suggested. After changing it, I've used the deploy Wizard to re-generate all Codejock LIB's and DLL's.<br><br>BOOL CXTPReportControl::RegisterWindowClass(HINSTANCE hInstance)<br>{<br>&nbsp;&nbsp;&nbsp; WNDCLASS wndcls;<br>&nbsp;&nbsp;&nbsp; HINSTANCE hInst = AfxGetInstanceHandle();<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; if (!(::GetClassInfo(hInst, XTPREPORTCTRL_CLASSNAME, &amp;wndcls)))<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // otherwise we need to register a new class<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wndcls.style&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wndcls.lpfnWndProc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = ::DefWindowProc;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wndcls.cbClsExtra&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = wndcls.cbWndExtra = 0;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //wndcls.hInstance&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = hInst;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wndcls.hInstance = hInstance ? hInstance : AfxGetInstanceHandle();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wndcls.hIcon&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = NULL;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wndcls.hCursor&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = AfxGetApp()-&gt;LoadStandardCursor(IDC_ARROW);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wndcls.hbrBackground&nbsp;&nbsp;&nbsp; = (HBRUSH) (COLOR_3DFACE + 1);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wndcls.lpszMenuName&nbsp;&nbsp;&nbsp;&nbsp; = NULL;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wndcls.lpszClassName&nbsp;&nbsp;&nbsp; = XTPREPORTCTRL_CLASSNAME;<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (!AfxRegisterClass(&amp;wndcls))<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; AfxThrowResourceException();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return FALSE;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; return TRUE;<br>}<br><br>And this is its call in my dialog's constructor:<br><br>&nbsp;&nbsp;&nbsp; HINSTANCE hRCthisDLL = AfxFindResourceHandle(MAKEINTRESOURCE(IDD), RT_DIALOG); <br>&nbsp;&nbsp;&nbsp; m_MissionList.RegisterWindowClass(hRCthisDLL);<br><br>Is there are any other thing that I should do ?<br><br>Thank you very much,<br><br>Joćo Pedro<br>]]>
   </description>
   <pubDate>Mon, 20 Nov 2006 04:45:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4572&amp;PID=17462&amp;title=xtpreport-as-custom-control#17462</guid>
  </item> 
  <item>
   <title><![CDATA[XTPReport as Custom Control : For old versions of toolkit RegisterWindowClass()...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4572&amp;PID=17406&amp;title=xtpreport-as-custom-control#17406</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 4572<br /><strong>Posted:</strong> 17 November 2006 at 7:46am<br /><br />For old versions of toolkit RegisterWindowClass() has no parameter.<br>&nbsp;<br>This is not a big problem, just create other one with parameter RegisterWindowClass(HINSTANCE hInstance).<br>copy code from existing RegisterWindowClass()<br>and change it a little, like:<br>&nbsp;&nbsp;&nbsp; wndcls.hInstance = hInstance ? hInstance : AfxGetInstanceHandle();<br>&nbsp;<br>See also:<br>https://forum.codejock.com/forum_posts.asp?TID=5211&amp;KW=RegisterWindowClass<br><br>--<br>WBR,<br>Serge <br>]]>
   </description>
   <pubDate>Fri, 17 Nov 2006 07:46:27 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4572&amp;PID=17406&amp;title=xtpreport-as-custom-control#17406</guid>
  </item> 
  <item>
   <title><![CDATA[XTPReport as Custom Control : Hello,I am new to MFC and Xtreme...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4572&amp;PID=17398&amp;title=xtpreport-as-custom-control#17398</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2517">jpnascim</a><br /><strong>Subject:</strong> 4572<br /><strong>Posted:</strong> 17 November 2006 at 5:11am<br /><br />Hello,<br><br>I am new to MFC and Xtreme Toolkit so excuse me if my doubts seem very basic. I am having the same problem with my Report Control.<br><br>I have a dialog in my DLL where I place a custom control to receive a Report Control.&nbsp; The problem is when I make a call to 'doModal' method of the dialog, it returns with -1 and the dialog won't show up.<br><br>In the class of my dialog I have the following member variable:<br><br>CXTPReportControl m_MissionList;<br><br>and in the constructor of the dialog class I've tried adding:<br><br>BOOL result = m_MissionList.RegisterWindowClass();<br><br>It returns 1 but the dialog still won't show up. I couldn't find a RegisterWindoClass method that would accept a parameter like the previous post. Am I doing something wrong or missing anything ?<br><br>Help is much appreciated.<br><br>Thank you,<br><br>Joćo Pedro<br><br><br>]]>
   </description>
   <pubDate>Fri, 17 Nov 2006 05:11:02 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4572&amp;PID=17398&amp;title=xtpreport-as-custom-control#17398</guid>
  </item> 
  <item>
   <title><![CDATA[XTPReport as Custom Control :  Well this did the trick in the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4572&amp;PID=14114&amp;title=xtpreport-as-custom-control#14114</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=686">cpede</a><br /><strong>Subject:</strong> 4572<br /><strong>Posted:</strong> 11 July 2006 at 2:38pm<br /><br /><FONT size=2><DIV>Well this did the trick in the constructor from within my DLL:</DIV><DIV>&nbsp;</DIV><DIV>m_ctrlReport.RegisterWindowClass(&lt;ResourceInstance handle of My DLL&gt;);</DIV><DIV>&nbsp;</DIV><DIV><IMG height=17 alt=Smile src="http://forum.codejock.com/smileys/smiley1.gif" width=17 align=absMiddle border="0"></DIV><DIV>&nbsp;</DIV><DIV>-cpede</DIV></FONT>]]>
   </description>
   <pubDate>Tue, 11 Jul 2006 14:38:34 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4572&amp;PID=14114&amp;title=xtpreport-as-custom-control#14114</guid>
  </item> 
  <item>
   <title><![CDATA[XTPReport as Custom Control : Hi,  I try to use the XTPReport...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4572&amp;PID=14113&amp;title=xtpreport-as-custom-control#14113</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=686">cpede</a><br /><strong>Subject:</strong> 4572<br /><strong>Posted:</strong> 11 July 2006 at 2:25pm<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>I try to use the XTPReport as a custom control in a dialog. I have seen this in one of your examples, and it works fine when my main application&nbsp;is showing a dialog.</DIV><DIV>&nbsp;</DIV><DIV>Now I'm trying to do the same from deep within a dialog in a separate DLL. This time the XTPReport class fails to create with an error in DoModal as a result.</DIV><DIV>&nbsp;</DIV><DIV>Do I need to register or initialize anything within this DLL to get the custom control to work?</DIV><DIV>&nbsp;</DIV><DIV>-cpede</DIV>]]>
   </description>
   <pubDate>Tue, 11 Jul 2006 14:25:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4572&amp;PID=14113&amp;title=xtpreport-as-custom-control#14113</guid>
  </item> 
 </channel>
</rss>