Solved

rich edit events

Posted on 1998-10-03
2
377 Views
Last Modified: 2013-11-20
how do i invoke a rich edit control's events... namely NM_CLICK.....thanks, it's pretty urgent.....
0
Comment
Question by:tillug
2 Comments
 
LVL 8

Accepted Solution

by:
Answers2000 earned 50 total points
ID: 1322895
NM_CLICK is not an event you normally trigger.

Windows sends your app an NM_CLICK notification to your app when the user clicks on your app.

The NM_CLICK notification is sent to the parent window of the edit control when the user clicks on it.  This is sent in the form of a WM_NOTIFY message

You can catch these messages using ON_NOTIFY or ON_NOTIFY_REFLECT (sent to the control's class).  See TN061 and TN062.

When you want to cause the control to do stuff using the member functions of CRichEditCtrl.  

You can use SendMessage to send these events.  However you should be aware that this is not the same as these events actually happening: you are simply sending the notification that the event happened (even though it didn't) not really triggering the actual mouse click.  If you really want to simulate a mouse click use SendMessage to send WM_LBUTTONDOWN and then WM_LBUTTONUP to the control, the edit control will then respond as if it were really clicked on.
0
 

Author Comment

by:tillug
ID: 1322896
mmm... but has it got anything to do with the OnMsgFilter message... online help stated that you can catch this event by modifying the MSGFILTER structure and returning TRUE... how to do that?
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

829 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