I have created a multi-doc application in visual c++ and in the CProjectView class I have used the function:
void CDrawView::OnLButtonDown(UINT nFlags, CPoint point) {
CString s1;
CString old;
CClientDC dc(this);
//add a crect to the dc at point
_itoa(point.x, s1, 10);
old += s1;
old += " , ";
_itoa(point.y, s1, 10);
old += s1;
AfxMessageBox(old);
}
This function is used to add a rectangle to the document and then show the co-ordinates of the point pressed. The problem I'm having is that the co-ordinates showing up are the co-ordinates of what's on the screen, not the whole document. The co-ordinates of the whoe document go up to 1700, 1122. But when I press the bottom-right of the view it shows only 950, 600. If I then scroll across and down and then press the bottom-right of the view again it shows only 950, 600 again(when I want it to show 1700, 1122). Can you help me?