Delphi Pages Forums

Delphi Pages Forums (
-   General (
-   -   Dot on screen (

Goober 01-02-2001 11:27 PM

Dot on screen
What is the delphi function for putting a single dot of a colour on the screen?
It needs to use HDC so that I can fit it in with the method I already have for drawing on the canvas of the screen.


PoseFant 01-03-2001 12:01 AM

RE: Dot on screen
I'm not sure of what you want to do, but here's something I cut from the help file ...

W: Word;
for W := 10 to 200 do
Canvas.Pixels[W, 10] := clRed;




OregonGhost 01-03-2001 02:42 AM

RE: Dot on screen
Delphi does not support a Pixel function with a HDC, you have to use the Windows-API-function
HDC hdc, // handle to device context
int X, // x-coordinate of pixel
int Y, // y-coordinate of pixel
COLORREF crColor // pixel color
It returns the color that was on the pixel before the call.
Oregon Ghost

All times are GMT. The time now is 02:19 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.