nanogui: Pen Colors
Subject:
Pen Colors
From:
"Keith Williams" ####@####.####
Date:
19 Nov 2002 13:38:42 -0000
Message-Id: <JKEGKHCJDJGHAADLELJPKEKPCCAA.espian@insightbb.com>
Hi,
After my earlier questions regarding the transparent and alpha blended
windows, I've modified the malpha demo to start to try to get the hang of
the Win32 GDI. I now have everything coming up initially the way that I want
it (window size, attributes, backgrounds, etc.). One of the windows will
display an x-y plot of data.
To test the plotting functions, I just picked a few and tried to draw on the
window. One of the results in particular is puzzling me. I did the
following:
ChanA = CreatePen(PS_SOLID, 0, rgb(0,255,0));
SelectObject(PenPlot, ChanA);
MoveToEx(PenPlot, 0,100, NULL);
LineTo(PenPlot, 300,120);
No matter what the color is changed to I always get a black line. I did
post the above code to a Win32 GDI newsgroup where someone tested it and
reported that they got a green line with the above code.
I've also tried SetPixel and SetPixelIV. I cannot get these two functions
to plot anything.
I'm still missing something very basic.
Thanks for any insight.
Keith