Two Pilots™    Home  |  Navigation  |  Site Map  |  Products  |  Download  |  Prices  |  For Partners  |  Support


All forums · Statistics · Search ·

Two Pilots forum / For software developers / PDFCreatorPilot x64: Problem with CPen
Author Message
shuebner
# Posted: 27 Jun 2011 06:24


Hello,

we've a problem with the x64 version of PDFCreatorPilot in our MFC application. We're unable to create a CPen using LOGBRUSH (http://msdn.microsoft.com/en-us/library/ykez8tds(v =VS.100).aspx) and select this pen into the PDFCreatorPilot's device context:

// green line, will not work in x64 mode
LOGBRUSH l;
l.lbColor = RGB(0,255,0);
l.lbStyle = BS_SOLID;
l.lbHatch = 0;
CPen pen2(PS_GEOMETRIC | PS_ENDCAP_FLAT | PS_SOLID, 40*factor, &l, 0, NULL);
pDC->SelectObject(&pen2);


SelectObject will not work here, instead the previous selected pen is used to draw the line.

The problem will not occur in Win32 mode. In x64 mode, only the CPen constructor without LOGBRUSH argument willl work as expected:

// blue line, works in Win32 and x64 mode
CPen pen1(PS_GEOMETRIC | PS_ENDCAP_FLAT | PS_SOLID, 40*factor, RGB(0,0,255));
CPen* pOldPen = pDC->SelectObject(&pen1);

Your help is greatly appreciated. If required, I can provide a VS 2010 solution to demonstrate the issue.

Thanks in advance,
Sebastian H?bner.

alexgrall
Member
# Posted: 28 Jun 2011 08:24


Hello, Sebastian

We will try to reproduce the problem.
We will inform you.

--
Alexander Grigorev
Two Pilots
http://www.colorpilot.com

 

 

Powered by miniBB 2.0 RC7 © 2001-2004 Page creation time (sec.): 0.014

 

Page top