Solved

rich edit events

Posted on 1998-10-03
2
354 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
mixString challenge 36 111
CRON statement to run every 3 minutes except on Monday morning 12am to 2am 7 89
WinWaitActive parameters 12 31
wordmultiple challenge 12 118
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…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

911 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