I have a rich text box which serves as a log. The log automatically scrolls itself down when a new message is appended, which is good. The only problem is when the user wants to view something in the log from before; if a new message is appended, the box automatically scrolls all the way down and prevents the user from seeing anything. I would like to be able to check if the rich text box is scrolled all the way down, and if it isn't not scroll down.
Currently I can get the scroll position in the virtual text space (SendMessage with EM_GETSCROLLPOS). I can also get scroll bar info with GetScrollBarInfo pinvoke. But how do I figure out what the bottom of the virtual text space is?