Solved

removing scroll bar from richedit control

Posted on 1997-04-29
6
522 Views
Last Modified: 2013-11-20
How do I remove the automatic vertical scroll bar from a rich edit control  ? (the scroll bar  is automatically added when the number of lines exceeds the visible lines in the view ). I have tried modifying the window's style so that WS_VCSROLL is removed, but this does not solve this problem. I want to do this dynamically because there are certain places in the program where I do want a scroll bar to appear in the rich edit control.
0
Comment
Question by:pjn
  • 3
  • 3
6 Comments
 
LVL 2

Accepted Solution

by:
rajesh032097 earned 100 total points
ID: 1301232
Hi,
Try using CWnd function ShowScrollBar(). This function will hide or show the scrollbars.

0
 

Author Comment

by:pjn
ID: 1301233
ShowScrollBar was nearly it but I get a big flicker where the toolbar was and then it was removed. My program uses the rich edit control as a log and hence this problem is really bad. If had tried you suggest with SetRedraw and LockWindowUpdate but no cigar. Any other ideas.
0
 
LVL 2

Expert Comment

by:rajesh032097
ID: 1301234
Sorry,
I have no idea for that problem. May be if you could elaborate more on how exactly you are using the rich edit control, one can get the solution.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:pjn
ID: 1301235
I am using the rich edit control to write continous logging information into. This is happening quite fast and evertime I add some text to the control which goes beyond the current depth the rich edit control automatically adds a vertical scrollbar. What I want to do is while sending information to the rich edit control is to disable the vertical scroll bar. It is very disconcerting seing the scrollbar recalculate its size everytime I add some text to it. Hopefully by removing the scrollbar, this will speed things up also. Then when I have finished adding the text to the control, I can reenable the scrollbar so the user can leaf back up through the log.
0
 
LVL 2

Expert Comment

by:rajesh032097
ID: 1301236
Hi,
I cannot solve your problem.
Sorry.
0
 

Author Comment

by:pjn
ID: 1301237
I fixed the problem myself by adding the following to my Views class constructor

m_dwDefaultStyle &= ~ WS_VSCROLL;

Thanks all the same for the input
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Expand to include initial dialog with two choices. 9 67
method notes when mouse over in eclipse 5 83
Smart Camera scanning and reading information 3 100
wordmultiple challenge 12 121
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now