Click here to Skip to main content
15,913,903 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionProblem with GetBitmapBits() in Win32 Pin
ashishbhatt29-Oct-07 18:49
ashishbhatt29-Oct-07 18:49 
AnswerRe: Problem with GetBitmapBits() in Win32 Pin
Naveen29-Oct-07 18:52
Naveen29-Oct-07 18:52 
GeneralRe: Problem with GetBitmapBits() in Win32 Pin
ashishbhatt29-Oct-07 19:01
ashishbhatt29-Oct-07 19:01 
GeneralRe: Problem with GetBitmapBits() in Win32 Pin
Naveen29-Oct-07 19:15
Naveen29-Oct-07 19:15 
GeneralRe: Problem with GetBitmapBits() in Win32 Pin
ashishbhatt29-Oct-07 19:26
ashishbhatt29-Oct-07 19:26 
GeneralRe: Problem with GetBitmapBits() in Win32 Pin
ashishbhatt29-Oct-07 19:08
ashishbhatt29-Oct-07 19:08 
AnswerRe: Problem with GetBitmapBits() in Win32 Pin
Naveen29-Oct-07 20:39
Naveen29-Oct-07 20:39 
GeneralRe: Problem with GetBitmapBits() in Win32 Pin
ashishbhatt29-Oct-07 21:42
ashishbhatt29-Oct-07 21:42 
Ya, Thanks.

But Now I am getting little much strange problem.Let me explain little much more abt my application.In my application the function in which this bitmap capture is available calls very frequently with diff diff rectangle position.

Now my problem is that at first rectangle data doesn't come(means I checked color value from the buffer it is black color for every pixel)but from second time it comes the data comes right. Every time data comes right aftere every one rectangle.

I hope it very silly mistake but i am not getting it Here I write code from which I print the Pixel values using setpixel.

<br />
<br />
unsigned char *destData = new unsigned char[iWidth*iHeight*sizeof(unsigned char *)] ;<br />
unsigned char *srcColor = new unsigned char[iWidth*iHeight*sizeof(unsigned char *)] ;<br />
	int color = 0;<br />
<br />
	for(int x = iHeight - 1; x >= 0; x--)<br />
		{<br />
			for(int y = 0; y < iWidth; y++)<br />
			{<br />
				<br />
 				srcColor[color++] = GetRValue(lpClrData[iWidth* x + y]);<br />
				srcColor[color++] = GetGValue(lpClrData[iWidth* x + y]);<br />
				srcColor[color++] = GetBValue(lpClrData[iWidth* x + y]);<br />
				<br />
				::SetPixel(m_hrootdc,x ,y ,RGB(srcColor[color-3],srcColor[color-2],srcColor[color-1])); <br />
			<br />
			}<br />
		}<br />
<br />


Ashish Bhatt

Questionhow to read an PNG file using c Pin
googlejumbo29-Oct-07 17:49
googlejumbo29-Oct-07 17:49 
AnswerRe: how to read an PNG file using c Pin
Paresh Chitte29-Oct-07 18:27
Paresh Chitte29-Oct-07 18:27 
Questionhow can i search an item in the MFCflexgrid? Pin
panthal29-Oct-07 17:37
panthal29-Oct-07 17:37 
AnswerRe: how can i search an item in the MFCflexgrid? Pin
chandu00429-Oct-07 19:44
chandu00429-Oct-07 19:44 
GeneralRe: how can i search an item in the MFCflexgrid? Pin
panthal29-Oct-07 20:13
panthal29-Oct-07 20:13 
GeneralRe: how can i search an item in the MFCflexgrid? Pin
chandu00429-Oct-07 21:39
chandu00429-Oct-07 21:39 
QuestionRe: how can i search an item in the MFCflexgrid? Pin
panthal29-Oct-07 23:07
panthal29-Oct-07 23:07 
GeneralOfftopic Pin
Nelek29-Oct-07 23:31
protectorNelek29-Oct-07 23:31 
GeneralRe: Offtopic Pin
chandu00430-Oct-07 2:26
chandu00430-Oct-07 2:26 
GeneralRe: Offtopic Pin
Nelek30-Oct-07 4:01
protectorNelek30-Oct-07 4:01 
QuestionCEdit control, how do we know if we press enter key? Pin
Gofur Halmurat29-Oct-07 15:39
Gofur Halmurat29-Oct-07 15:39 
AnswerRe: CEdit control, how do we know if we press enter key? Pin
Naveen29-Oct-07 16:14
Naveen29-Oct-07 16:14 
GeneralRe: CEdit control, how do we know if we press enter key? Pin
chandu00431-Oct-07 1:35
chandu00431-Oct-07 1:35 
QuestionDisplaying image (RAW format) on a control Pin
Raza568029-Oct-07 13:53
Raza568029-Oct-07 13:53 
QuestionSmall hint dialog Pin
Jarrah_1229-Oct-07 12:07
Jarrah_1229-Oct-07 12:07 
AnswerRe: Small hint dialog Pin
Nishad S29-Oct-07 17:55
Nishad S29-Oct-07 17:55 
QuestionRe: Small hint dialog Pin
Hamid_RT29-Oct-07 18:50
Hamid_RT29-Oct-07 18: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.