Solved

Syntax Coloring Editor - How???

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
ADO Memory leak with DELPHI 2007 37 155
Strange date stored 22 100
while loop over for loop 7 79
has22 challenge 11 71
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…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

758 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

21 Experts available now in Live!

Get 1:1 Help Now