Print Page | Close Window

ObjectBusy When Rendering With GDI+

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1463
Printed Date: 01 Jul 24 at 5:02AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: ObjectBusy When Rendering With GDI+
Posted By: mulfycrowh
Subject: ObjectBusy When Rendering With GDI+
Date Posted: 31 May 10 at 6:53PM
Hello Everybody !
 
Here can you have a look on my OnPaint method :
 

/**************************

* OnPaint *

**************************/

void OnPaint(HDC hdc)

{

int dpi = 96;

double pageWidth = CT4UDLL_PDF::getInstance().Get_PageWidth();

double pageHeight = CT4UDLL_PDF::getInstance().Get_PageHeight();

Bitmap* PDFImage = new Bitmap(int(pageWidth/10),int(pageHeight/10));

Graphics* PDFGraphics = Graphics::FromImage(PDFImage);

HDC PDFhdc = PDFGraphics->GetHDC();

bool Res = CT4UDLL_PDF::getInstance().RenderPDFFilePage(NULL,CT4UDLL_PDF::getInstance().Get_FileHandle(),dpi,1);

Status St = PDFGraphics->DrawImage(PDFImage,0,0);

};

 

When starting the project (VC++), St equals to "ObjectBusy".

Could you please tell me why and the right way to render my PDF page on the screen ?

Thanks a lot !

 

 




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk