-
March 13th, 2002, 06:16 AM
#1
Scrolling a multiline Edit(box) automatically (Win32)
I'd like to scroll to the bottom of an Edit automatically whenever a line is added, so I wrote this:
SendMessage(hWnd(), LOWORD(WM_VSCROLL), SB_BOTTOM, 0);
hWnd() returns the hwnd of the edit.
This worked just fine under Win2k but it doesn't work at all under Win98. What am I doing wrong?
---
Regards,
Vitaly Belman
ICQ: 1912453
-
July 30th, 2011, 01:15 PM
#2
Re: Scrolling a multiline Edit(box) automatically (Win32)
Try writing something like this:
Code:
//////////////// My Edit Box Control settings: ////////////////////
EDITTEXT IDC_EDIT1,12,88,396,98,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL
CString m_EditBoxValue;
DDX_Text(pDX, IDC_EDIT1, m_EditBoxValue);
//////////////////////////////////////////////////////////////////////////
CEdit * eb;
eb = (CEdit*)GetDlgItem(IDC_EDIT1); // Set V
//this is an example
for (int i = 0; i < 1000; i++)
{
m_EditBoxValue += "New Text ABCDEFGHIJKLMNOPQRSTUVWXYZ Tralalalalalalalalal";
UpdateData(FALSE);
eb->LineScroll(eb->GetLineCount());
Hope, someone finds it useful.
-
July 31st, 2011, 01:11 AM
#3
Re: Scrolling a multiline Edit(box) automatically (Win32)
I am sure Vitaly Belman is happy to read this after wating 9 years for an answer...
-
July 31st, 2011, 01:26 PM
#4
Re: Scrolling a multiline Edit(box) automatically (Win32)
"Hope, someone finds it useful."
I do not expect some people to understand what they read and why I have posted that replay. Some are just too narrow minded i.e. lack of imagination Have a nice day "Einstein".
-
August 1st, 2011, 12:50 AM
#5
Re: Scrolling a multiline Edit(box) automatically (Win32)
Sorry, I really didn't understand how important is to solve Win98 problems... It is not enough that program runs successfully in Win2K - we should not forget about Win98/95 users.
-
August 1st, 2011, 09:02 AM
#6
Re: Scrolling a multiline Edit(box) automatically (Win32)
Originally Posted by Alex F
Sorry, I really didn't understand how important is to solve Win98 problems... It is not enough that program runs successfully in Win2K - we should not forget about Win98/95 users.
The question is: was this solution even tested on Win98?
Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
Convenience and productivity tools for Microsoft Visual Studio:
FeinWindows - replacement windows manager for Visual Studio, and more...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|