Solved

How to know when user types in Rich Edit Control?

Posted on 2004-04-30
3
190 Views
Last Modified: 2013-11-20
I have a rich edit control in a dialog which may have some text already when dialog starts, I need to detect if user types inside this control, if user does, I want a hiding button  to show up. How to tell when user types something in control?

Thanks.
Hanqian
0
Comment
Question by:Hanqian
  • 2
3 Comments
 
LVL 48

Expert Comment

by:AlexFM
ID: 10963669
Handle EN_CHANGE message in the dialog - it is send by edit control to parent window when text is changed.
0
 

Author Comment

by:Hanqian
ID: 10963707
I have tried EN_CHANGE before asking this question, it doesn't work.

Hanqian
0
 
LVL 48

Accepted Solution

by:
AlexFM earned 100 total points
ID: 10966019
To get this notification working add this line to OnInitDialog:

m_rich.SetEventMask(m_rich.GetEventMask() | ENM_CHANGE);   // m_rich is CRichEditCtrl class member
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

705 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