You first need to get the window handle (hwnd) of your game, then when you have that you can use GetDC, and from there GetPixel.

Amazingly I already made a source today for something similar to this.

http://cruels.net/index.php?s=&showt...ndpost&p=48114