我想用rect.PtInRect(point),但程序中的鼠标图象与实际点击位置不一致检验程序如下:
void CMy7303Dlg::OnLButtonDown(UINT nFlags, CPoint point) 
{
// TODO: Add your message handler code here and/or call default
GetCapture();
CRect rect;
         CDC* pdc = GetWindowDC();
HDC hdc = GetWindowDC()->m_hDC;
HBRUSH hbr = CreateSolidBrush(RGB(255, 0, 0));
rect.SetRect(40, 40, 80, 80);
::FrameRect(hdc, rect,hbr);
pdc->SetPixel(point, RGB(0,0,0));
CDialog::OnLButtonDown(nFlags, point);
if (rect.PtInRect(point))
{
AfxMessageBox("hello");
}}
那位大侠,帮我解决以下,我谢先了