Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rick Text Control _Scrooling

Status
Not open for further replies.

sweep123

Technical User
May 1, 2003
185
GB
Simple question how do you always have the text being written to this control visible; i.e. the data added onto the text is always show; i.e. the scroll bars always being move to the botton for new data.

e.g.

Data crlf
New data crfl etc
etc

The text grows.
 
you should sent WM_SCROLL messages.

Ion Filipski
1c.bmp
 
I have used the following:-

SCROLLINFO scrollInfo;
CRicd_output m_Output; // Rick Text Control


m_Output.GetScrollInfo(SB_VERT, &scrollInfo, SIF_ALL);
scrollInfo.nPos = scrollInfo.nMax;
m_Output.SetScrollPos (SB_VERT, scrollInfo.nPos, TRUE);
UpdateData(); // Refresh the control

But how do I use the message:-
OnVScroll(SB_VERT, scrollInfo.nPos, Scrollctrl of the Rich Text Control);


 
do you experience any problems on using this message?

Ion Filipski
1c.bmp
 
Yes, what should be in the routine OnVScroll() and how do I call it, I dont know the 3rd parameter 'Scrollctrl of the Rich Text Control'

Everything works OK if I use the mouse to move the Scrollbar, but I still have to do this, help!
 
there is nothing specific to richedit. This is a standard API for any kind of windows. So, to handle WM_SCROLL you may subclass the richedit. To scroll send message WM_SCROLL, read documentation for message WM_SCROLL and for function SendMessage.

Ion Filipski
1c.bmp
 
I have went back to the Edit Box control, still dont know what to do!

Help?
 
read the manual, I gave you the correct dirrection. This is not a big technical issue you to afford when working with SendMessage. Try msdn.microsoft.com or of course google.com.

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top