<?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="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>Debenu Quick PDF Library - PDF SDK Community Forum : Trouble with Library and DirectX</title>
  <link>http://www.quickpdf.org/forum/</link>
  <description><![CDATA[This is an XML content feed of; Debenu Quick PDF Library - PDF SDK Community Forum : I need help - I can help : Trouble with Library and DirectX]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 06 Apr 2026 02:52:20 +0000</pubDate>
  <lastBuildDate>Wed, 09 Jun 2010 19:16:30 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 11.01</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.quickpdf.org/forum/RSS_post_feed.asp?TID=1471</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Debenu Quick PDF Library - PDF SDK Community Forum]]></title>
   <url>http://www.quickpdf.org/forum/forum_images/QPDF_Forum_Title.png</url>
   <link>http://www.quickpdf.org/forum/</link>
  </image>
  <item>
   <title><![CDATA[Trouble with Library and DirectX : Hi,I use the Quick PDF Library...]]></title>
   <link>http://www.quickpdf.org/forum/trouble-with-library-and-directx_topic1471_post6629.html#6629</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1329">Shah</a><br /><strong>Subject:</strong> 1471<br /><strong>Posted:</strong> 09 Jun 10 at 7:16PM<br /><br />Hi,<br>I use the Quick PDF Library year back and it works great.<br>About your question<br><br><div><b>Between the lines PTA: and PTB:</b></div><b>Although Res returns true, it's no more possible to blit srcSurface onto the backbuffe</b><br><br>You need to work little close with your code. <br>First make sure "RenderPDFFilePageToDC" is working fine. If it is working fine means there is no issue with library.<br>Second step check function "D3DXLoadSurfaceFromSurface" you have enough memory available to render page on buffer.<br>also try co call "AddDirtRec" explicitly.<br><br>Thanks,<br>Shah<br>]]>
   </description>
   <pubDate>Wed, 09 Jun 2010 19:16:30 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/trouble-with-library-and-directx_topic1471_post6629.html#6629</guid>
  </item> 
  <item>
   <title><![CDATA[Trouble with Library and DirectX : May be, that was other problem...]]></title>
   <link>http://www.quickpdf.org/forum/trouble-with-library-and-directx_topic1471_post6617.html#6617</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1320">Jan</a><br /><strong>Subject:</strong> 1471<br /><strong>Posted:</strong> 07 Jun 10 at 7:55AM<br /><br /><P>May be, that was other problem (I'm know nothing about GDI+, I use C# where is GDI+ encapsulated...&nbsp;):</P><DIV><FONT size=2><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>public</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>void</FONT></FONT><FONT size=2> redraw()</P><DIV>{</DIV><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>int</FONT></FONT><FONT size=2> vysledek;</P><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (pdf == </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>null</FONT></FONT><FONT size=2>) { </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>return</FONT></FONT><FONT size=2>; }</P><P></FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>Graphics</FONT></FONT><FONT size=2> g = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>this</FONT></FONT><FONT size=2>.CreateGraphics();</P><P></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>//Do Double Buffering</P></FONT></FONT><FONT size=2><P></FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>Graphics</FONT></FONT><FONT size=2> offScreenDC;</P><P>offScreenDC = </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>Graphics</FONT></FONT><FONT size=2>.FromImage(offScreenBmp);</P><P>offScreenDC.TextRenderingHint = System.Drawing.Text.</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>TextRenderingHint</FONT></FONT><FONT size=2>.AntiAlias;</P><P>offScreenDC.SmoothingMode = System.Drawing.Drawing2D.</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>SmoothingMode</FONT></FONT><FONT size=2>.AntiAlias;</P><P>offScreenDC.Clear(</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>this</FONT></FONT><FONT size=2>.BackColor);</P></FONT><FONT size=2><P>vysledek = pdf.DARenderPageToDC(fileHandle, pdf.DAFindPage(fileHandle, strana), zoom, offScreenDC.GetHdc().ToInt32());</P><DIV>// <FONT color=#ff0000>HERE: without use ReleaseHdc() was screen empty...</FONT></DIV><DIV>offScreenDC.ReleaseHdc();</DIV><P></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// I draw the buffer on the graphic of my control</P></FONT></FONT><FONT size=2><P></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>//g.DrawImageUnscaled(offScreenBmp, 0, 0);</P></FONT></FONT><FONT size=2><P>g.DrawImageUnscaled(offScreenBmp, - dx, - dy);</P><P>offScreenDC.Dispose();</P><P>g.Dispose();</P><P>}</P></FONT></DIV>]]>
   </description>
   <pubDate>Mon, 07 Jun 2010 07:55:09 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/trouble-with-library-and-directx_topic1471_post6617.html#6617</guid>
  </item> 
  <item>
   <title><![CDATA[Trouble with Library and DirectX : Good morning !  Here you will...]]></title>
   <link>http://www.quickpdf.org/forum/trouble-with-library-and-directx_topic1471_post6611.html#6611</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1308">mulfycrowh</a><br /><strong>Subject:</strong> 1471<br /><strong>Posted:</strong> 05 Jun 10 at 8:30AM<br /><br />Good morning !<DIV>&nbsp;</DIV><DIV>Here you will find a sample under DirectX :</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#cc0000>MY PDF DLL :<BR>----------------</FONT></DIV><DIV>&nbsp;</DIV><DIV>// T4UDLL_PDF.cpp : Defines the exported functions for the DLL application.<BR>//</DIV><DIV>#include "stdafx.h"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>#include "T4UDLL_PDF.h"<BR>#include "QuickPDFDLL0719.h"</DIV><DIV>#define LENGTH_FILENAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100</DIV><DIV>const char&nbsp;cQuickPDFFileName&#091;LENGTH_FILENAME&#093;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = "C:\\Program Files\\Quick PDF Library\\DLL\\QuickPDFDLL0719.dll";<BR>const string&nbsp;strLicenseKey&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= "j59g79ru43q9dp4b35ri7nt5y";&nbsp;&nbsp;&nbsp; <BR>const string&nbsp;&nbsp;&nbsp; password&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= "";</DIV><DIV>// Declare and load Quick PDF Library DLL<BR>static QuickPDFDLL0719&amp; My_QuickPDF&nbsp;= QuickPDFDLL0719::getInstance(cQuickPDFFileName);</DIV><DIV>/********************<BR>* Class Constructor *<BR>********************/<BR>CT4UDLL_PDF::CT4UDLL_PDF(void)<BR>{<BR>&nbsp;// Unlock the library<BR>&nbsp;int iResult = My_QuickPDF.UnlockKey(strLicenseKey);<BR>&nbsp;PDFLibraryUnlocked = (iResult == 1);<BR>};</DIV><DIV>/*******************<BR>* Class Destructor *<BR>*******************/<BR>CT4UDLL_PDF::~CT4UDLL_PDF(void)<BR>{<BR>}</DIV><DIV>/******************************************<BR>* EXPORTED FUNCTION&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>* getInstance&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>* Gets the singleton of the class&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;*<BR>******************************************/<BR>extern "C" __declspec(dllexport)CT4UDLL_PDF&amp; CT4UDLL_PDF::getInstance()<BR>{<BR>&nbsp;static CT4UDLL_PDF pInstance;<BR>&nbsp;return pInstance;<BR>}</DIV><DIV>/************************************************<BR>* OpenPDFFile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>* Opens the PDF file and loads&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>* the following fields :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp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p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>* Returns success&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>************************************************/<BR>bool CT4UDLL_PDF::OpenPDFFile(const char* PDFFileName)<BR>{<BR>&nbsp;FileHandle = My_QuickPDF.DAOpenFile(PDFFileName,password);<BR>&nbsp;PageCount = My_QuickPDF.GetPageCount(FileHandle);<BR>&nbsp;// Reference on the first page of the document<BR>&nbsp;// To compute height and width<BR>&nbsp;&nbsp;&nbsp; PageReference = My_QuickPDF.DAFindPage(FileHandle,1);<BR>&nbsp;PageHeight = My_QuickPDF.GetPageHeight(FileHandle,PageReference);<BR>&nbsp;PageWidth =&nbsp; My_QuickPDF.GetPageWidth(FileHandle,PageReference);<BR>&nbsp;return (FileHandle != 0);<BR>};</DIV><DIV><BR>/************************************************************<BR>* RenderPDFFilePageToDC&nbsp; &nbsp;&nbsp;&nbsp;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************************************************/<BR>bool CT4UDLL_PDF::RenderPDFFilePageToDC(int DeviceContext, int DPI, int PageNumber)<BR>{<BR>&nbsp;int PageReference = My_QuickPDF.DAFindPage(FileHandle,PageNumber);<BR>&nbsp;int PageRendered = My_QuickPDF.DARenderPageToDC(FileHandle,PageReference,DPI,DeviceContext);<BR>&nbsp;return (PageRendered == 1);<BR>};</DIV><DIV><BR>/************************************************************<BR>* RenderPDFFilePageToFile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<BR>* Renders the specified page from the specified document&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>* Directly onto a Device Context&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>************************************************************/<BR>bool CT4UDLL_PDF::RenderPDFFilePageToFile(const char* FileName, int DPI, int PageNumber, int Options)<BR>{<BR>&nbsp;int PageReference = My_QuickPDF.DAFindPage(FileHandle,PageNumber);<BR>&nbsp;int PageRendered = My_QuickPDF.DARenderPageToFile(FileHandle,PageReference,Options,DPI,FileName);<BR>&nbsp;return (PageRendered == 1);<BR>};</DIV><DIV>/************************************************<BR>* ClosePDFFile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>* Closes the PDF file&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>************************************************/<BR>void CT4UDLL_PDF::ClosePDFFile(int FileHandle)<BR>{<BR>&nbsp;My_QuickPDF.DACloseFile(FileHandle);<BR>};</DIV><DIV>/**************************************<BR>* Get_KeyDetected&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>* Accessor to PDFLibraryUnlocked&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>**************************************/<BR>bool CT4UDLL_PDF::Get_PDFLibraryUnlocked(void)<BR>{<BR>&nbsp;return PDFLibraryUnlocked;<BR>}</DIV><DIV>/**************************************<BR>* Get_FileHandle&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>* Accessor to FileHandle&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>**************************************/<BR>int CT4UDLL_PDF::Get_FileHandle(void)<BR>{<BR>&nbsp;return FileHandle;<BR>}</DIV><DIV>/************************************************<BR>* Get_PageCount&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>* Accessor to PageCount&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>************************************************/<BR>int CT4UDLL_PDF::Get_PageCount(void)<BR>{<BR>&nbsp;return PageCount;<BR>}</DIV><DIV>/**************************************<BR>* Get_PageHeight&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>* Accessor to PageHeight&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>**************************************/<BR>double CT4UDLL_PDF::Get_PageHeight(void)<BR>{<BR>&nbsp;return PageHeight;<BR>}</DIV><DIV>/**************************************<BR>* Get_PageWidth&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>* Accessor to PageWidth&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;*<BR>**************************************/<BR>double CT4UDLL_PDF::Get_PageWidth(void)<BR>{<BR>&nbsp;return PageWidth;<BR>}</DIV><DIV>/**************************************<BR>* Get_LastErrorCode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>* Accessor to LastErrorCode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>**************************************/<BR>int CT4UDLL_PDF::Get_LastErrorCode(void)<BR>{<BR>&nbsp;return LastErrorCode;<BR>}</DIV><DIV>/**********************************************<BR>* Get_Canvas&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>* Gets a device context handle from a canvas&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>**********************************************/<BR>HDC CT4UDLL_PDF::Get_Canvas(int Width, int Height)<BR>{<BR>&nbsp;return (HDC)My_QuickPDF.GetCanvasDC(Width,Height);<BR>}</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#cc0000>HERE IS MY METHOD FOR RENDERING A BITMAP UNDER DIRECTX<BR>IT RUNS WELL :<BR>--------------------------------------------------------------------------------</FONT></DIV><DIV><BR>/********************************************************************<BR>* Render_IconBitmap&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>* Renders the icon bitmap from the top left coordinates _X,_Y&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<BR>********************************************************************/<BR>HRESULT dxManager::Render_IconBitmap(int _X,int _Y,int iGraspHelpMsg,int iIconBitmapReference)<BR>{<BR>&nbsp;RECT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;src;<BR>&nbsp;RECT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dest;<BR>&nbsp;D3DXIMAGE_INFO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; imageInfo;<BR>&nbsp;HRESULT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hResult;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IDirect3DSurface9*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pBufferBitmap = NULL;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IDirect3DSurface9*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; srcSurface = NULL;<BR>&nbsp;D3DSURFACE_DESC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; desc_backbuffermem;<BR>&nbsp;string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sIconBitmapFileName = cDirectoryIcons + My_Turn_For_You.Get_PBitmap(iIconBitmapReference)-&gt;Get_BitmapFilename();</DIV><DIV><BR>&nbsp;// Computes the new coordinates for the given resolution<BR>&nbsp;_X = ConvertCoordinate_X(_X);<BR>&nbsp;_Y = ConvertCoordinate_Y(_Y);</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (FAILED(D3DXGetImageInfoFromFile(format_Bitmap(sIconBitmapFileName).c_str(), &amp;imageInfo)))<BR>&nbsp;&nbsp;return E_FAIL;<BR>&nbsp;src.bottom&nbsp; = imageInfo.Height-1;<BR>&nbsp;src.left&nbsp;&nbsp;&nbsp; = 0;<BR>&nbsp;src.right&nbsp;&nbsp; = imageInfo.Width-1;<BR>&nbsp;src.top&nbsp;&nbsp;&nbsp;&nbsp; = 0;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dest.bottom = _Y+imageInfo.Height-1;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dest.left&nbsp;&nbsp; = _X;<BR>&nbsp;dest.right&nbsp; = _X+imageInfo.Width-1;<BR>&nbsp;dest.top&nbsp;&nbsp;&nbsp; = _Y;<BR>&nbsp;// Creates the object within the backup class<BR>&nbsp;if (iGraspHelpMsg != ID_MSG_DUMMY)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;pBackup.push_back(new CBackup(TYPE_BITMAP_GRASP,iIconBitmapReference,iGraspHelpMsg,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; My_Turn_For_You.Get_PageTurnForYou(),_X,_Y,dest));<BR>&nbsp;&nbsp;&nbsp;++Nb_GraspObjects;<BR>&nbsp;&nbsp;}<BR>&nbsp;else<BR>&nbsp;&nbsp;&nbsp;&nbsp; pBackup.push_back(new CBackup(TYPE_BITMAP,iIconBitmapReference,ID_MSG_DUMMY,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; My_Turn_For_You.Get_PageTurnForYou(),_X,_Y,dest));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ++ Nb_DisplayedObjects;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Gets backbuffer_mem descriptor<BR>&nbsp;backbuffer_mem-&gt;GetDesc(&amp;desc_backbuffermem);<BR>&nbsp;// Creates a surface whose size equals to size of bitmap with same descriptor as backbuffer_mem<BR>&nbsp;// Descriptors mut be the same ones for UpdateSurface method to succeed<BR>&nbsp;// D3DPOOL_DEFAULT for UpdateSurface method to suceed<BR>&nbsp;if (FAILED(pd3dDevice-&gt;CreateOffscreenPlainSurface(imageInfo.Width, imageInfo.Height,desc_backbuffermem.Format, <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; D3DPOOL_DEFAULT, &amp;pBufferBitmap, NULL)))<BR>&nbsp;&nbsp;&nbsp; return E_FAIL;<BR>&nbsp;pBackup&#091;Nb_DisplayedObjects-1&#093;-&gt;Set_SurfaceObject(pBufferBitmap);<BR>&nbsp;// Copies the region of backbuffer_mem to pBufferBitmap<BR>&nbsp;if (FAILED(D3DXLoadSurfaceFromSurface(pBufferBitmap,NULL,&amp;src,backbuffer_mem,NULL,&amp;dest,D3DX_FILTER_NONE,0)))<BR>&nbsp;&nbsp;return E_FAIL;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Gets the bitmap surface<BR><FONT color=#cc0000>PTA:</FONT>&nbsp;if (FAILED(srcSurface = getSurfaceFromBitmap(format_Bitmap(sIconBitmapFileName))))<BR>&nbsp;&nbsp;return E_FAIL;</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#cc0000>PTB:</FONT>&nbsp;// Copies srcSurface to backbuffer<BR>&nbsp;if (FAILED(blitToSurface(srcSurface, &amp;src, &amp;dest)))<BR>&nbsp;&nbsp;return E_FAIL;<BR>&nbsp;// Copies the bitmap surface to backbuffer_mem<BR>&nbsp;hResult = D3DXLoadSurfaceFromSurface(backbuffer_mem,NULL,&amp;dest,srcSurface,NULL,&amp;src,D3DX_FILTER_NONE,0);<BR>&nbsp;return hResult;<BR>}</DIV><DIV><BR><FONT color=#cc0000>QUESTION IS :<BR>------------------</FONT></DIV><DIV>When I add the lines :</DIV><DIV><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HDC hdc;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; srcSurface-&gt;GetDC(&amp;hdc);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool Res = CT4UDLL_PDF::getInstance().RenderPDFFilePageToDC((int)hdc,92,1);</DIV><DIV>&nbsp;</DIV><DIV>Between the lines PTA: and PTB:</DIV><DIV><BR>Although Res returns true, it's no more possible to blit srcSurface onto the backbuffer !</DIV><DIV>&nbsp;</DIV><DIV><BR><FONT color=#cc0000 size=4>WHY ????</FONT></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sat, 05 Jun 2010 08:30:11 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/trouble-with-library-and-directx_topic1471_post6611.html#6611</guid>
  </item> 
 </channel>
</rss>