News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

RGB color from point ?

Started by hutch--, April 05, 2010, 03:13:02 AM

Previous topic - Next topic

hutch--

Has anyone seen, designed or used code that will pick an RGB color from and X Y location on the screen ? I have had a look around but cannot find any obvious way to do this.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

oex

We are all of us insane, just to varying degrees and intelligently balanced through networking

http://www.hereford.tv

donkey

Be sure to get the screen DC:

invoke GetDC,NULL ; get screen DC
mov hScreenDC, eax
invoke GetPixel,eax,0,0
push eax ; push the color
invoke ReleaseDC,NULL,hScreenDC
pop eax ; pop the color
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

hutch--

Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Farabi

Or access the pixel directly from the memory bitmap.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"