Hello,
Not sure where to ask this.
I have a dialog application that is doing some screen scrapping.
I have been able to get it to work on 1 machine. I have reconfigured a second machine with the same resolution. I am having an issue on the second machine.
The issue is, Lets say we have a grid of 9 x 9. On the first machine I have been able to get the full grid of 9 x 9 with all the pixels from it, as it gets filled by the user of that machine.
However , second machine is where I am having issues with is, I am unable to get full 9 x 9 grid as the user fills the grid out. I get a partial grid. It could be only first 20 or 40 but never been able to get full 81 as I get from the first machine.
Can someone please help, what could be happening.
What I have tried so far: Short of the differences between physical devices, I have re-installed the operating system and set both machines to the same desktop resolution.
I have been able to send mouse clicks to both applications. My only issue is getting the pixel back from the second machine.
Any Ideas?
Modified to add the code:
hWnd is a handle to the target window.
HDC DlgDC;
COLORREF Color;
DlgDC = ::GetDC(hWnd);
Color = ::GetPixel(DlgDC,x[a],y[b]);
if (Color == RGB(213,7,11))
{
Result = 2;
}
if (Color == RGB(3,16,255))
{
Result = 1;
}
if (Color == RGB(23,211,12))
{
Result = 0;
::ReleaseDC(hWnd, DlgDC);
DeleteObject(DlgDC);