When i load image into temporary DC. the pixel[15,50]is green on the control .But in the temporary dc, It is [15,80].
It as if my image is go down in temp DC.
I don't now why?.
Could anyone help me?
my first control, use this:
void myfunction(CPoint point,CDC *dc)
{ CDC dcMem;
dcMem.CreateCompatibleDC(dc);
dcMem.SelectObject(bmpCOM);
HDC hdcMem=dcMem;
COLORREF clr= GetPixel(hdcMem,point.x,point.y);
}
My Second control, i click directly onn control with LBUTTONDOWN.
void CDirectClickCtrl::OnLButtonDown(UINT nFlags, CPoint point)
{
HWND hWnd=this->GetSafeHwnd();
COLORREF clr=GetPixel(::GetDC(hWnd),point.x,point.y);
COleControl::OnLButtonDown(nFlags, point);
}