Thread: edit control - entering only numbers

  1. #1
    Registered User Micko's Avatar
    Join Date
    Nov 2003
    Posts
    715

    edit control - entering only numbers

    Hi, I'm wrtiting MFC application which is going to perform some calculations. I want to allow user to enter only numbers in edit control field. I'm using Visual C++ .net and set property "number" of edit control to true. That is working fine. But when user try to enter a letter he gets (I think windows) notification :
    "Unacceptable Character
    You can only type a number here"
    Because English is not my native language and I don't want the application to be in English language I need to somehow turn it off. How can I do that?
    I have win Xp service pack 2.
    Thanks for help!

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    That functionality is most likely coming from a DDV_xxx() routine in your DoDataExchange() method. Comment out the DDV_xxx() routine for that edit control and see if the message box goes away.

    gg

  3. #3
    Registered User Micko's Avatar
    Join Date
    Nov 2003
    Posts
    715
    Thanks, but that didn't help me much.
    However, I figure out what cause it.When creating new project - MFC appliaction I left option Common Control Manifest checked in Advanced fetures. I simply deleted manifest file and manifest resources and it works now!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. can't disable ctrl-V on a rich edit control
    By rakan in forum Windows Programming
    Replies: 1
    Last Post: 02-06-2008, 08:37 AM
  2. Dialog Edit Control and Enter Key
    By Quantrizi in forum Windows Programming
    Replies: 2
    Last Post: 04-14-2004, 07:59 AM
  3. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM
  4. Controlling an edit control
    By master5001 in forum Windows Programming
    Replies: 2
    Last Post: 10-16-2001, 03:08 PM
  5. Rich edit control example Win API
    By Echidna in forum Windows Programming
    Replies: 1
    Last Post: 09-17-2001, 02:12 AM