Solved

Syntax Coloring Editor - How???

Posted on 1997-08-12
4
247 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
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 150 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

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
C++ BOOL WINAPI ReadFile fails on windows 10 when reading from USB cable 9 378
matchUp  challenge 6 53
NotAlone Challenge 20 79
Unix Command -- Challenging  question 7 87
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
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…

920 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

11 Experts available now in Live!

Get 1:1 Help Now