Erreur ObjectBusy sous GDI+
Bonjour à tous !
Je cherche à afficher une page PDF sous GDI+ grâce à la librairie QuickPDF.
J'ai écrit la méthode OnPaint :
Code:
1 2 3 4 5 6 7 8 9 10 11 12
| 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);
}; |
St me renvoie systématiquement ObjectBusy.
Pourquoi ?
Comment corriger cela ?
Merci à tous