Click here to Skip to main content
15,881,089 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In MFC edit control I need to allow only 0 to 2147483647. For that if user tries to type value more than 2147483647, I need to reset the value to previously entered good value.

To handle this requirement I am calling Setwindowtext in EN_UPDATE which makes ctrl+z not working?

How to resolve this

What I have tried:

I tried Replacesel instead of setwindowtext that is also not helped.
SetSel( 0, -1, true );ReplaceSel( m_szGoodValue, true);
Posted
Updated 22-May-22 22:35pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900