   MFC:  Getting caret position in CRichEditCtrl
  I am developing a Windows text application (using MFC), and I''m trying to constantly display the line and column of where the caret is in the text window (multiline rich edit box).  The problem is that the CWnd::GetCaretPos() function returns the caret coordinates in the rich edit box, but those coordinates don''t increase as I scroll down the document.So, let''s say that I have a 100-line document, and my rich edit window only displays 20 lines at a time - you have to use the scroll bar to scroll down the document, right?  So, you scroll down to the end of the document (the 100th line), and the coordinates that I''m given still say that I''m on line 20.I realize that the function is giving me the caret coordinates relative to the rich edit box, but I want them relative to the top of the document - like Microsoft Word does Am I going about this the right way?  Any help would be greatly appreciated    HellspawnXIII"There''s a lot of stuff in this world that needs stepping on." 
  Couldn''t you just add in the result from CRichEditCtrl::GetFirstVisibleLine() to get the actual line? There are other methods, but I believe they involve sending messages to the window and not using the MFC CRichEditCtrl functions. 