BCGSoft Professional Editor for MFC
void CBCGPEditCtrl::VirtToClient ( CRect &  rect)

Converts a point in document coordinates to client coordinates.

Call this function to convert a rectangle in the edit control document coordinates to client coordinates. The function takes the document coordinates and subtracts the current vertical scroll offset multiplied by the line height and the current horizontal scroll offset multiplied by the maximal character width.

Parameters
rect[in, out] Contains the document coordinates to convert and the result when the function returns.