Click here to Skip to main content
15,886,110 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionQuestion Pin
Hamid_RT18-Feb-06 20:28
Hamid_RT18-Feb-06 20:28 
AnswerRe: Question Pin
mbue18-Feb-06 20:56
mbue18-Feb-06 20:56 
AnswerRe: Question Pin
Divyang Mithaiwala18-Feb-06 21:19
Divyang Mithaiwala18-Feb-06 21:19 
Questionfind pixel colour on screen Pin
OnTilt18-Feb-06 18:51
OnTilt18-Feb-06 18:51 
AnswerRe: find pixel colour on screen Pin
Divyang Mithaiwala18-Feb-06 20:57
Divyang Mithaiwala18-Feb-06 20:57 
GeneralRe: find pixel colour on screen Pin
Gavin Taylor19-Feb-06 2:17
professionalGavin Taylor19-Feb-06 2:17 
GeneralRe: find pixel colour on screen Pin
Divyang Mithaiwala19-Feb-06 17:26
Divyang Mithaiwala19-Feb-06 17:26 
AnswerRe: find pixel colour on screen Pin
Gavin Taylor19-Feb-06 2:19
professionalGavin Taylor19-Feb-06 2:19 
Take a look at the GetWindowDC[^] API, if you pass NULL as it's window handle it will return a device context back for the current desktop. After that you can use GetPixel[^] to retrieve the color for any pixel. You'll need something like:
COLORREF GetDesktopPixel( int x, int y )
{
	COLORREF cl = 0;
	HDC hDC = NULL;
	
	hDC  = GetWindowDC( NULL ); // Get DC for Desktop
	cl = GetPixel( hDC, x, y );
	DeleteDC( hDC ); // Close the DC
	
	return cl;
}



Gavin Taylor
w: http://www.gavspace.com

AnswerRe: find pixel colour on screen Pin
OnTilt19-Feb-06 9:47
OnTilt19-Feb-06 9:47 
AnswerRe: find pixel colour on screen Pin
Owner drawn19-Feb-06 18:15
Owner drawn19-Feb-06 18:15 
QuestionTrapping Interrupts in Windows Pin
Rane18-Feb-06 17:40
Rane18-Feb-06 17:40 
AnswerRe: Trapping Interrupts in Windows Pin
Gary R. Wheeler19-Feb-06 4:11
Gary R. Wheeler19-Feb-06 4:11 
GeneralRe: Trapping Interrupts in Windows Pin
Rane19-Feb-06 18:50
Rane19-Feb-06 18:50 
QuestionSimple Win32 Console App question... Pin
jc0dex18-Feb-06 15:36
jc0dex18-Feb-06 15:36 
AnswerRe: Simple Win32 Console App question... Pin
PJ Arends18-Feb-06 16:58
professionalPJ Arends18-Feb-06 16:58 
GeneralRe: Simple Win32 Console App question... Pin
jc0dex18-Feb-06 17:27
jc0dex18-Feb-06 17:27 
GeneralRe: Simple Win32 Console App question... Pin
PJ Arends18-Feb-06 17:32
professionalPJ Arends18-Feb-06 17:32 
AnswerRe: Simple Win32 Console App question... Pin
jc0dex18-Feb-06 17:57
jc0dex18-Feb-06 17:57 
QuestionHow to use CreateProcessAsUser?! Pin
PPatrickFFM18-Feb-06 13:20
PPatrickFFM18-Feb-06 13:20 
AnswerRe: How to use CreateProcessAsUser?! Pin
oshah18-Feb-06 13:40
oshah18-Feb-06 13:40 
Questionrich edit box Pin
Sam 200618-Feb-06 13:11
Sam 200618-Feb-06 13:11 
AnswerRe: rich edit box Pin
Michael Dunn18-Feb-06 13:21
sitebuilderMichael Dunn18-Feb-06 13:21 
GeneralRe: rich edit box Pin
Sam 200618-Feb-06 14:10
Sam 200618-Feb-06 14:10 
GeneralRe: rich edit box Pin
Sam 200618-Feb-06 16:25
Sam 200618-Feb-06 16:25 
QuestionPrinting Combinations Pin
RockyJames18-Feb-06 9:50
RockyJames18-Feb-06 9:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.