Solved

How to know when user types in Rich Edit Control?

Posted on 2004-04-30
3
193 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MFC Dialog 9 49
Change owner from userA to server Local Administrators 7 62
matchUp  challenge 6 60
Fibonacci challenge 11 121
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…
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…
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.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

776 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