I've successfully used DCs in both 98 and 2k. I found that the Arc function
fails in 98, but lines and multilines work fine. I'm guessing you have to
define pens and brushes first.
$pen = new Win32::GUI::Pen
(
-style => 0,
-width => 1,
-color => 0x0000FF,
);
$dc = $Main->GetDC ();
$dc->SelectObject ($pen);
$dc->MoveTo (...
$dc->LineTo (...
[...]
$blue = [ 51, 102, 255];
$Pb5 = new Win32::GUI::Pen (-color => 0x000000, -width => 5);
$Bblu = new Win32::GUI::Brush ($blue);
@_ = (180, 200, 100, $pitch + $roll, 180 - 2 * $pitch);
$dc->BeginPath();
$dc->Arc (@_[0..3], 0);
$dc->AbortPath(); # just to position pen on
arc
$dc->SelectObject($Pb5); # thick black line
$dc->SelectObject($Bblu); # blue background
$dc->BeginPath();
$dc->Arc (@_); # this fails on windows 9x
$dc->CloseFigure(); # but works fine under 2k
$dc->EndPath();
$dc->StrokeAndFillPath();
> -----Original Message-----
> From: Chris Ingrassia [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 14, 2002 06:31
> To: [email protected]
> Subject: [perl-win32-gui-users] Win2k/DeviceContext Problems?
>
>
>
> Related to my last message - has anyone experienced any
> problems using
> DeviceContexts
> on Windows 2000? I tried using my DrawIcon and simple LineTo
> code at home
> using the same version of ActivePerl and the PPM distribution
> v556 and v650,
> and both worked great. I got back here and ran the same code, only to
> discover it still doesn't work. I suspect this means that
> for whatever
> reason drawing to the Device Context in windows 2000 is
> broken? Can anyone
> fill me in on this?
>
> thanks,
>
> chris
>
>
> _______________________________________________________________
>
> Don't miss the 2002 Sprint PCS Application Developer's Conference
> August 25-28 in Las Vegas -
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
_______________________________________________
Perl-Win32-GUI-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users