Scrolling problems with CEdit - Multiline on a dialog 
Author Message
 Scrolling problems with CEdit - Multiline on a dialog

Hello,

I have a CEdit multiline control on a Dialog (the dialog has a member
variable for this control) to which I write lines of output. The control
is read-only,user cannot type in text.

As the lines are displayed the Vertical scroll  bar comes in action, but
the one can't see the lines scrolling. More clearly, the lines are
displayed, the scrollbar size and position changes but the lines now
being added (displayed) to the contol are not visible , you need to
scroll down to see them. There is no AUTO-scrolling as the lines are
added to control using the CWnd::SetWindowText/UpdateData(FALSE) call.

The properties for this CEDit are:

AutoVScroll FALSE
VScroll TRUE
No horizontal scrollbars
Read-Only TRUE

Can any help me out on, how to make the control,CEdit, display/make
visible the last added few lines (AUTO-SCORLL)

Please use REPLY-ALL/mail me.

Thanx in advance for your help

-Nilesh
--

----------------------------000---------------------------
Nilesh P. Kale                  BT-Labs,
Mahindra-British Telecom.       PP12/MLB1,Martlesham-Heath,
Pune, India                     IPSWICH,UK
                                IP5 3RE.
e-mail:



---------------------------00000--------------------------



Fri, 16 Jun 2000 03:00:00 GMT  
 Scrolling problems with CEdit - Multiline on a dialog

Quote:

> As the lines are displayed the Vertical scroll  bar comes in action, but
> the one can't see the lines scrolling. More clearly, the lines are
> displayed, the scrollbar size and position changes but the lines now
> being added (displayed) to the contol are not visible , you need to
> scroll down to see them. There is no AUTO-scrolling as the lines are
> added to control using the CWnd::SetWindowText/UpdateData(FALSE) call.

I'm not completely sure this will work with a read-only control, but try
setting the selection to the end of the text.  Something like this:

  CEdit* pEdit = (CEdit*)GetDlgItem(IDC_MYEDIT);
  pEdit->SetSel(0x7FFF,0x7FFF);     // Set empty selection at end

Jim [VC/MFC MVP]
To send mail, change nospam to msn



Fri, 16 Jun 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Scrolling problems with CEdit - Multiline on a dialog

2. Scrolling a multiline CEdit

3. Multiline CEdit in Dialog.

4. CEdit Multiline problem

5. MultiLine CEdit Ctrl Problem

6. Multiline CEdit custom background color problem

7. Programmatically scroll CEdit in a dialog?

8. Scrolling a multiline edit control

9. How to scroll multiline editbox by programmig ?

10. CEdit cluss multiline property

11. MFC - CEdit/CEditView Multiline selects

12. Multiline CEdit control

 

 
Powered by phpBB® Forum Software