Thread: How to handle the message ON_EN_CHANGE for a read only CEdit?
Started 1 month, 1 week ago by dullboy
I tried to add a function to handle the message ON_EN_CHANGE for a read only CEdit control but the function is never being called no matter what. I guess it might be related to read only property of this CEdit control. So I wander is there any way to handle ON_EN_CHANGE message for a read only CEdit control? Thanks for your inputs.
Actually, this read only edit control is associated with a member data and the member data is updated due to some logic. With the help of DDX, text on the read only edit control will also be updated. Whenever there is change on the read only edit control, I expect to capture an event. Right now it looks like I could capture the ON_EN_CHANGE event. Hopefully I make myself clear. Thanks for your...
I doubt there is any built-in event you can grab. As you know OnEditChange only gets fired when a user enters text into the edit box.
For your use, if I'm not mistaken, you can write a custom ddx entry which will get called when the ddx mechanism fires. Inside the custom entry handler you can compare the edit box contents with that value that is about to update it. If the values don't ...
What you suggested works! Thanks a lot for your help.
Quote:
Originally Posted by Arjay
I doubt there is any built-in event you can grab. As you know OnEditChange only gets fired when a user enters text into the edit box.
For your use, if I'm not mistaken, you can write a custom ddx entry which will get called when the ddx ...
I was confused reading this post thinking if it should be here or in some other forum (C#?).
Quote:
Originally Posted by dullboy
. . .handle the message ON_EN_CHANGE for a read only CEdit control. . . might be related to read only property. . .
Property as used in some languages like C# or other, property is ...
John, you are correct. I was a bit laxed in my use of the term 'event'. We are talking about a windows message here. On the other hand, Windows is considered to be an event based OS, so windows messages actually are considered to be events. Still, it's probably best to keep the two separate.
Hi Arjay, please do not take my post it as criticism of yours. This is happening everywhere in this forum and others. I wrote it as general remark.
Again my POCDS.
I think you are right; it is better to keep it separate.
Event to my understanding is something that happens, given time and place (happening).
Window is a message driven OS. When mouse button is clicked - hardware event, ...
What you suggested works! Thanks a lot for your help. Quote: Originally Posted by Arjay I doubt there is any built-in event you can grab. As you know OnEditChange only gets fired when a user enters text into the edit box. For your use, if I'm not mistaken, you can write a custom ddx entry which will get called when the ddx mechanism fires. Inside the custom entry handler you can compare the edit box contents with that value that is about...
How are you envisioning a read only edit changing?
Related threads:
No related threads found!
Thread profile page for "How to handle the message ON_EN_CHANGE for a read only CEdit?" on http://www.codeguru.com.
This report page is a snippet summary view from a single thread "How to handle the message ON_EN_CHANGE for a read only CEdit?", located on the Message Board at http://www.codeguru.com.
This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity