?
Solved

Syntax Coloring Editor - How???

Posted on 1997-08-12
4
Medium Priority
?
271 Views
Last Modified: 2013-11-19
I tried implementing syntax coloring in a CRichEditView based App.  It works but can be tedious and slow because of the message based way the text color is changed.  How can I implement syntax coloring in say a CEditView class?  I notice that Microsoft's Visual C++ IDE editor does not use CRichEditView because it supports splitters.  The way Microsoft implemented syntax coloring is realy cool and fast.  How the heck did they do it?  
0
Comment
Question by:WillieSwart
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 

Expert Comment

by:craven080297
ID: 1303561
Yes you can use a CEditView, just call GetEditCtrl() method which informs you about the currently used CEdit. This should allow you to make use of standard notification on character stroke, thus modify any attribute (fi: color) on the fly.
0
 

Author Comment

by:WillieSwart
ID: 1303562
As far as I know, CEdit does not allow the display of more than one font at a time, thus not allowing more than one color in a CEdit control.  Am I missing something craven?  If so, please clarify your answer.  thanx
0
 
LVL 8

Accepted Solution

by:
gelbert earned 300 total points
ID: 1303563
You can use user interface thread to do coloring. In this case if will not affect perfomance of main thread which will do the rest of functionality.
You can look at sample in mfc\advanced\mtgdi
0
 

Expert Comment

by:bola053097
ID: 1303564
try SourceView at www.tetradyne.com. Its pretty cool! I did
use the RichEditControl for highlighting but its too slow
at Serialization time



0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Suggested Courses
Course of the Month13 days, 7 hours left to enroll

801 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