<?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 : Possible Bug in Print Preview</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Possible Bug in Print Preview]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 22 Apr 2026 00:36:57 +0000</pubDate>
  <lastBuildDate>Wed, 31 Jan 2007 09:16:04 +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=6269</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[Possible Bug in Print Preview : This problem lies in a change...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6269&amp;PID=19947&amp;title=possible-bug-in-print-preview#19947</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=306">JonN</a><br /><strong>Subject:</strong> 6269<br /><strong>Posted:</strong> 31 January 2007 at 9:16am<br /><br /><P>This problem lies in a change to the code in the calling function CPreviewDC::TabbedTextOut(..)&nbsp; Starting at line 722 in dcprev.cpp we now have in SP1 </P><DIV>int* pDeltas = NULL;<BR>LPTSTR pOutputString = NULL;<BR>int nRightFixup;</DIV><DIV>::ATL::CAutoVectorPtr&lt;int&gt; spDeltas;<BR>::ATL::CAutoVectorPtr&lt;TCHAR&gt; spOutputString;<BR>if(!spDeltas.Allocate(nCount) || <BR>&nbsp;&nbsp;!spOutputString.Allocate(nCount))<BR>{<BR>return 0;<BR>}</DIV><DIV>UINT uCount = nCount;<BR>CSize sizeFinalExtent = ComputeDeltas(x, lpszString, uCount, TRUE,&nbsp;nTabPositions, lpnTabStopPositions, nTabOrigin,&nbsp;&nbsp;&nbsp;pOutputString, pDeltas, nRightFixup);</DIV><DIV>&nbsp;</DIV><DIV>Note that the ComputeDeltas call supplies the uninitialized pOutputString, pDeltas as parameters rather than the new spOutputString, spDeltas which are correctly defined and initialized using the ATL::CAutoVectorPt calls.</DIV><DIV><BR>Earlier versions used the standard new and delete to allocate and delete&nbsp;the pOutputString, pDeltas variables.&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>Still not sure of the easiest workaround though.&nbsp; Rebuilding the MFC libraries is not very appealing!</DIV><DIV>&nbsp;</DIV><DIV>Jon Neades</DIV><DIV><a href="http://www.mathtech.co.uk" target="_blank">www.mathtech.co.uk</A> </DIV>]]>
   </description>
   <pubDate>Wed, 31 Jan 2007 09:16:04 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6269&amp;PID=19947&amp;title=possible-bug-in-print-preview#19947</guid>
  </item> 
  <item>
   <title><![CDATA[Possible Bug in Print Preview : A bit more research and it looks...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6269&amp;PID=19941&amp;title=possible-bug-in-print-preview#19941</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=306">JonN</a><br /><strong>Subject:</strong> 6269<br /><strong>Posted:</strong> 31 January 2007 at 6:26am<br /><br />A bit more research and it looks like this is a Microsoft bug introduced into VC2005 by SP1.&nbsp; The Superpad MFC example also fails with the same error.&nbsp; As yet no fix has been posted. <img src="https://forum.codejock.com/smileys/smiley6.gif" border="0">.&nbsp; For more info see:<DIV>&nbsp;</DIV><DIV><a href="https://c&#111;nnect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=254738" target="_blank">https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=254738</A></DIV><DIV>&nbsp;</DIV><DIV>Jon Neades</DIV><DIV><a href="http://www.mathtech.co.uk" target="_blank">www.mathtech.co.uk</A></DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 31 Jan 2007 06:26:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6269&amp;PID=19941&amp;title=possible-bug-in-print-preview#19941</guid>
  </item> 
  <item>
   <title><![CDATA[Possible Bug in Print Preview : Hi Oleg  I&amp;#039;m running VC...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6269&amp;PID=19919&amp;title=possible-bug-in-print-preview#19919</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=306">JonN</a><br /><strong>Subject:</strong> 6269<br /><strong>Posted:</strong> 31 January 2007 at 4:05am<br /><br />Hi Oleg<DIV>&nbsp;</DIV><DIV>I'm running VC 2005 with SP1 installed.</DIV><DIV>&nbsp;</DIV><DIV>The crash occurs in line&nbsp;604 of dcprev.cpp, in the line</DIV><DIV>&nbsp;</DIV><DIV><FONT size=2>*pnCurDelta = tmAttrib.tmAveCharWidth;</FONT></DIV><DIV>&nbsp;</DIV><DIV>It appears that the pointer <FONT size=2>pnCurDelta is NULL, which cannot be correct!</FONT></DIV>]]>
   </description>
   <pubDate>Wed, 31 Jan 2007 04:05:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6269&amp;PID=19919&amp;title=possible-bug-in-print-preview#19919</guid>
  </item> 
  <item>
   <title><![CDATA[Possible Bug in Print Preview : Hi, What vcversion do you have? What...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6269&amp;PID=19908&amp;title=possible-bug-in-print-preview#19908</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 6269<br /><strong>Posted:</strong> 31 January 2007 at 1:19am<br /><br /><P>Hi,</P><DIV>What vc&nbsp;version do you have?</DIV><DIV>What line of code in MFC sources have problem?</DIV>]]>
   </description>
   <pubDate>Wed, 31 Jan 2007 01:19:25 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6269&amp;PID=19908&amp;title=possible-bug-in-print-preview#19908</guid>
  </item> 
  <item>
   <title><![CDATA[Possible Bug in Print Preview : Using 10.4.2 I&amp;#039;ve discovered...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6269&amp;PID=19882&amp;title=possible-bug-in-print-preview#19882</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=306">JonN</a><br /><strong>Subject:</strong> 6269<br /><strong>Posted:</strong> 30 January 2007 at 12:37pm<br /><br />Using 10.4.2 I've discovered that my application and the sample Print Preview program crash when trying to display a CEditView in print preview.&nbsp; (I didn't notice whether 10.4.0 crashes.)<DIV>&nbsp;</DIV><DIV>MFC asserts in debug mode in the MFC module dcprev.cpp&nbsp;at <FONT size=2>CPreviewDC::ComputeDeltas(...) .</FONT></DIV><DIV>&nbsp;</DIV><DIV>Other types of view display properly in print preview.</DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>I've also disovered that the standard MFC implementation CPreviewView also crashes the same way, so it is possible this is a bug&nbsp;with Microsoft.</FONT></DIV><DIV>&nbsp;</DIV><DIV>Does anyone know whether this is a known bug, or&nbsp;any workaround?</DIV>]]>
   </description>
   <pubDate>Tue, 30 Jan 2007 12:37:31 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6269&amp;PID=19882&amp;title=possible-bug-in-print-preview#19882</guid>
  </item> 
 </channel>
</rss>