HDC hdc = ::GetDC(m_hWnd); RECT rect = { 10,10,100,100 }; POINT point = { 50,50 }; BOOL b = PtInRect(&rect,point);//判断一个点是否在矩形中 /* 参数1:RECT*lprc 参数2:POINT 返回值:如果点在rect对象中,那么返回值为非零,否则返回值为0 */ CString str; str.Format(_T("b=%d"),b ); ::OutputDebugString(str);
- 矩形 MFC-PtInRect PtInRect MFC矩形mfc-ptinrect ptinrect mfc mfc-ptinrect 矩形mfc-rectangle rectangle mfc 矩形mfc-getwindowrect边框getwindowrect 矩形mfc-fillrect fillrect mfc 矩形mfc-setrectempty坐标setrectempty 集部 矩形mfc-unionrect unionrect 矩形mfc-offsetrect offsetrect mfc 矩形mfc-isrectempty isrectempty mfc 矩形 坐标 拷贝mfc-copyrect