stealing pixels muahahahhaa

Started by
6 comments, last by machiavelli 20 years, 1 month ago
in short: i need to get a pixel(or group of pixels, one by one) located at x,y from whatever windows is displaying at this instant and save that pixel for later use. i tried MSDN but they suck for a beginner programmer. i also tred googling and most of the replies that come back are those that use MFC and i am using win32 and have no interest in learning MFC until i learn win32. thanks in advance for any help. or a link to help. or the meaning of life.
Advertisement
Check out GetPixel(hdc,x,y) ... but in general this is not the ideal way to handle the screen ...
Too old for this ...
i looked at that and getpixel will work fine because i dont need high performance... but how do i get an hdc that is a representation of the video memory that is currently being displayed?

hdc=GetDC(HWND).. doesnt that give me a handle to my window only? if i didnt paint anything onto hdc wouldnt it be blank? i need a handle to the video memory so that i can get values directly out of it dont i?
Possibly use:
HWND GetDesktopWindow(VOID);

Then try to get the HDC from it.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/getdesktopwindow.asp

And how do I make a link like that "clickable"?
quote:Original post by JotDot
And how do I make a link like that "clickable"?


the same way you do it in HTML, because it gets posted as HTML.

<a href="http://www.mylink.com">http://www.mylink.com</a>

will look like:


http://www.mylink.com

and i can get it to print both ways only because i possess magic powers...for future reference you can reverse engineer anyones post by clicking the "edit" button near their post. then you'll get to see the text they entered (and my magic will no longer be magic )

-me



[edited by - Palidine on March 18, 2004 1:03:05 PM]

[edited by - Palidine on March 18, 2004 1:03:52 PM]
Edit button? That''s it?? Nothing to code like some IE plugin or anything? ARRGH. No wonder - that''s too easy and too obvious

Thanks for the tip!
hey thanks. i already got everything working =) well.. everything except responding to mouse clicks when my window is not the one with focus...
for your mouse:
if( GetAsyncKeyState(VK_LBUTTON) == 0 )
{
//Mouse pressed !
}

This topic is closed to new replies.

Advertisement