Edit Box

This is a discussion on Edit Box within the Windows Programming forums, part of the Platform Specific Boards category; Good day! I make MFC Application. I should catch the input to editbox and forbid to appear some symbols, for ...

  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    15

    Edit Box

    Good day!
    I make MFC Application. I should catch the input to editbox and forbid to appear some symbols, for example, -,+,*,/. How can I do it?
    Thanks.

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,246
    Subclass the edit box, and then over-ride PreTranslateMsg(). Then just catch the WM_CHAR messages. Evaluate the WM_CHAR message, and see if the character is one you want to catch or not.

  3. #3
    Registered User
    Join Date
    Jul 2004
    Posts
    15
    Sorry but where can I read more detail about this matter?
    And can I catch keypressing on other programs?
    May be some tutorial?

  4. #4
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,246
    I dont know of any places off hand where you can learn more info on this. Maybe codeproject or codeguru.

    The function you're interested in is SetWindowLong()

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 02-13-2008, 02:59 PM
  2. edit box
    By beene in forum Windows Programming
    Replies: 3
    Last Post: 11-11-2006, 04:40 AM
  3. edit box affecting displaying of text?
    By algi in forum Windows Programming
    Replies: 4
    Last Post: 05-04-2005, 04:28 PM
  4. How to program a "back" button with MFC
    By 99atlantic in forum Windows Programming
    Replies: 3
    Last Post: 04-26-2005, 09:34 PM
  5. display a file in dropdown edit box
    By sunburnbyRA in forum Windows Programming
    Replies: 2
    Last Post: 03-10-2004, 01:58 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21