Solved

rich edit events

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

747 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

13 Experts available now in Live!

Get 1:1 Help Now