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,一个点,str,返回值,矩形,rect,PtInRect From: https://www.cnblogs.com/liming19680104/p/17322555.html