Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 01-02-2001, 11:27 PM
Goober Goober is offline
Junior Member
 
Join Date: Jan 2001
Posts: 17
Default 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.

Thanks
Goober
Reply With Quote
  #2  
Old 01-03-2001, 12:01 AM
PoseFant PoseFant is offline
Senior Member
 
Join Date: Jan 2001
Posts: 1,002
Default RE: Dot on screen

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

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

end;


Regards

/Filip
Reply With Quote
  #3  
Old 01-03-2001, 02:42 AM
OregonGhost OregonGhost is offline
Member
 
Join Date: Jan 2001
Posts: 77
Default RE: Dot on screen

Delphi does not support a Pixel function with a HDC, you have to use the Windows-API-function
COLORREF SetPixel(
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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 04:00 PM.


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