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);
}; |
Partager