troubleshooting Question

Create custom CEdit controls that validate input as you type

Avatar of mikexpert
mikexpert asked on
System Programming
6 Comments3 Solutions1068 ViewsLast Modified:
Hi Experts,
 
I'm trying to extend CEdit so that I can modify its OnChar or OnKeyDown functions - so that I can perform input validation and not allow invalid input.  However, I think I'm going about this all wrong - these functions are not being called for my subclass when I type keys as I expected.  Am I right in assuming that member variables which are controls are not tied directly through my object?  Everything in windows is a message right?  Is there no way to go about this in a java-swing sort of way?
 
I've seen countless examples of how to do input validation with DDX and DDV calls - but I would much rather just create my own classes that already have all this behavior built into them - and have MFC use my classes and interact with them as objects...
 
Any suggestions or is this not possible with MFC?
 
Thanks,
Mike
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 3 Answers and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros