Click here to Skip to main content
15,892,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Get text associated with 'Edit Control' in MFC Pin
CodingLover11-Oct-07 18:02
CodingLover11-Oct-07 18:02 
AnswerRe: Get text associated with 'Edit Control' in MFC Pin
CodingLover11-Oct-07 19:59
CodingLover11-Oct-07 19:59 
GeneralRe: Get text associated with 'Edit Control' in MFC Pin
chandu00411-Oct-07 21:31
chandu00411-Oct-07 21:31 
AnswerRe: Get text associated with 'Edit Control' in MFC Pin
chandu00411-Oct-07 21:30
chandu00411-Oct-07 21:30 
GeneralRe: Get text associated with 'Edit Control' in MFC Pin
CodingLover11-Oct-07 21:38
CodingLover11-Oct-07 21:38 
QuestionRGB from bmp instead from desktop? Pin
purplee8510-Oct-07 21:08
purplee8510-Oct-07 21:08 
AnswerRe: RGB from bmp instead from desktop? Pin
Nishad S10-Oct-07 21:16
Nishad S10-Oct-07 21:16 
AnswerRe: RGB from bmp instead from desktop? Pin
Nibu babu thomas10-Oct-07 21:34
Nibu babu thomas10-Oct-07 21:34 
purplee85 wrote:
This program enable me to get RGB from desktop but how can i modify it to get the RGB from a bmp image instead?


Here is a function that does this...

COLORREF GetPixelValueFromBitmap( const int x, const int y, CBitmap& bmp )
{
	CDC dcDesktop;
	dcDesktop.Attach( ::GetDC( GetDesktopWindow() ));
	
	CDC dc;
	dc.CreateCompatibleDC( &dcDesktop );
	const int nRestorePoint = dc.SaveDC();
	dc.SelectObject( &bmp );
	const COLORREF clr = dc.GetPixel( x, y );
	dc.RestoreDC( nRestorePoint );

	return clr;
}



Nibu thomas
MVP For VC++

Code must be written to be read, not by the compiler, but by another human being.

Programming Blog: http:\\nibuthomas.wordpress.com

QuestionOS compatibility!! Pin
vipin_nvk10-Oct-07 21:01
vipin_nvk10-Oct-07 21:01 
AnswerRe: OS compatibility!! Pin
Matthew Faithfull10-Oct-07 23:06
Matthew Faithfull10-Oct-07 23:06 
QuestionMouse Click Message From Desktop Pin
ashishbhatt10-Oct-07 20:52
ashishbhatt10-Oct-07 20:52 
AnswerRe: Mouse Click Message From Desktop Pin
Nishad S10-Oct-07 21:23
Nishad S10-Oct-07 21:23 
GeneralRe: Mouse Click Message From Desktop Pin
Nishad S10-Oct-07 23:23
Nishad S10-Oct-07 23:23 
GeneralRe: Mouse Click Message From Desktop Pin
ashishbhatt11-Oct-07 1:37
ashishbhatt11-Oct-07 1:37 
GeneralRe: Mouse Click Message From Desktop Pin
Nishad S11-Oct-07 1:43
Nishad S11-Oct-07 1:43 
GeneralRe: Mouse Click Message From Desktop Pin
ashishbhatt11-Oct-07 2:00
ashishbhatt11-Oct-07 2:00 
GeneralRe: Mouse Click Message From Desktop Pin
Nishad S11-Oct-07 18:03
Nishad S11-Oct-07 18:03 
Questionhow to read the Red Green and Blue values from a bmp image file? Pin
purplee8510-Oct-07 20:48
purplee8510-Oct-07 20:48 
AnswerRe: how to read the Red Green and Blue values from a bmp image file? Pin
Nelek10-Oct-07 20:51
protectorNelek10-Oct-07 20:51 
GeneralRe: how to read the Red Green and Blue values from a bmp image file? Pin
purplee8510-Oct-07 20:55
purplee8510-Oct-07 20:55 
GeneralRe: how to read the Red Green and Blue values from a bmp image file? Pin
Nelek10-Oct-07 22:43
protectorNelek10-Oct-07 22:43 
QuestionVectors! Pin
Michael10110-Oct-07 20:17
Michael10110-Oct-07 20:17 
AnswerRe: Vectors! Pin
Nibu babu thomas10-Oct-07 20:28
Nibu babu thomas10-Oct-07 20:28 
GeneralRe: Vectors! Pin
Michael10110-Oct-07 20:29
Michael10110-Oct-07 20:29 
GeneralRe: Vectors! Pin
Nibu babu thomas10-Oct-07 20:32
Nibu babu thomas10-Oct-07 20:32 

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.