如何在“编辑"框中验证字符串 [英] How to verify a string in a Edit box
本文介绍了如何在“编辑"框中验证字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好!
我对Edit_box有问题.我在vc ++ 2003下使用mfc.我的目标是获得长期价值.在编辑框中只能输入数字或``.''字符.如果用户输入其他字符,则会出现afxmessagebox.在此先感谢
Hello!
I have a problem with an Edit_box. I use mfc under vc++2003. My goal is to obtain a long value. In the edit box must be entered only numbers or the ''.'' character. if the user enter another character an afxmessagebox should appear. thanks in advance
推荐答案
请参阅 ^ ]用于CEdit控件的功能.每次更改内容时都要检查内容,并在其中包含非法字符的情况下显示消息框.
See here[^] for the features of the CEdit control. Check the contents every time it changes and show your message box if it contains an illegal character.
这篇关于如何在“编辑"框中验证字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文