Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

to allow to write few marks in a dialog box

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,
I would like to allow to write just these marks in a dialog box :
'0' -> '9'
'x' 'X' '+'

I used the method OnChar to make this but it doesn't work.
Someone can help me ?

Thanks
 
Why don't you set a CStatic control in the dialog? then whenever you want to display your mark, you just need to write it into your CStatic control. It is much simpler.
 
The problem is the user must write a polynom like this for example :

x9+x6+x2

and I can't use a CStatic for this.
I must use a field where the user can write.

Thanks for help
 
Derived a special CEdit and override OnChar(), do not call the base class implementation if nChar is not one of your "approved" characters.

HTH
Shyan
 
Yes, just do as sflam said. If the char is not in your list, just ignore it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top