?
Solved

rich edit events

Posted on 1998-10-03
2
Medium Priority
?
407 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
Answers2000 earned 100 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

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

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

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…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

752 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