Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Syntax Highlighting for CRichEditView

Posted on 2002-04-26
6
Medium Priority
?
360 Views
Last Modified: 2013-11-20
I am trying to create a program in VC6.0. SDI App on Win98.  Trying to create a simple syntax highligher for the perl scripting I do.  

I can't see to find how to make it call my function when the text is changed. That way I would do that syntax highlight again.


BOOL CPerlScripterView::PreTranslateMessage(MSG* pMsg)
{
     if (n == 258){ // found the number by monitoring the messages and this one seamed to be passed when ever a key was pressed
          ...
     }
     return CRichEditView::PreTranslateMessage(pMsg);
}

void CPerlScripterView::OnEditPaste()
{
     GetRichEditCtrl().Paste();
     ...
}

void CPerlScripterView::OnEditCut()
{
     GetRichEditCtrl().Cut();
     ...
}

this seams to work but it doesn't take care of everything that can happen, for example someone uses the replace text option.

Is there a window message like EM_CHANGE.. I belive that works for CEditView.
0
Comment
Question by:MarkOttoSmith
  • 3
  • 2
6 Comments
 
LVL 12

Expert Comment

by:migel
ID: 6972901
Hi!
Can you check www.codeguru.com and www.codeproject com? there are several syntax  highlighers at this sites you can choose from RichEdit based and Pure CWnd derived ones.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6973447
Please remain active in your questions here and provide feedback to the Experts who help you.  If more is needed, let them know.
Thank you,
Moondancer - EE Moderator
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7011108
MarkOttoSmith has not responded to my request of 4/27/02, nor to help posted by Experts.  It looks like this is left in my hands to finalize.

Expert input is appreciated here so I can be fair in the finalization of this question.

Thanks,

Moondancer - EE Moderator
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 12

Expert Comment

by:migel
ID: 7011325
Hmm
Can be point to the existing solition accepted as answer?
0
 

Author Comment

by:MarkOttoSmith
ID: 7030913
no solution was suggested. But i managed to find out using the msdn that by doing something like

long eventmask = GetRichEditCtrl().GetEventMask() | ENM_CHANGE;
GetRichEditCtrl().SetEventMask( eventmask );

then the ON_CONTROL_REFLECT(EN_CHANGE, OnChanged)
would call OnChange when the doc changed
0
 
LVL 1

Accepted Solution

by:
Moondancer earned 0 total points
ID: 7068940
You found your own solution, thanks for sharing it.

300 points refunded, item closed.

Moondancer - EE Moderator
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Suggested Courses

877 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