Thread: Is Text Modified in Edit Control

  1. #1
    The larch
    Join Date
    May 2006
    Posts
    3,573

    Is Text Modified in Edit Control

    Hi
    I would like to display a message in a statusbar if text inside an edit box has been modified. I don't seem to get this to work. Which message should I respond to? I've tried WM_CHAR and WM_KEYDOWN in my WindowProc.

    Code:
    case WM_KEYDOWN:
           ModifiedMessage(hwnd);
           break;
    I have this function open a MessageBox for debugging purposes, and it shows that the ModifiedMessage function is never called.

    #Edit:
    I already got it working with adding this to the WM_COMMAND case:
    Code:
    case WM_COMMAND:
               if (HIWORD(wParam) == EN_CHANGE)
               {
                   ModifiedMessage(hwnd);
                   break;
               }
    I hope, this won't mess up anything else.
    Last edited by anon; 05-21-2006 at 08:33 AM.

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    >>I hope, this won't mess up anything else.<<

    No, it won't. Use of the EN_CHANGE notification is correct in the context you have described.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Controlling edit control input
    By Gerread in forum Windows Programming
    Replies: 6
    Last Post: 05-03-2007, 08:56 PM
  2. Problems with my edit control...
    By tyouk in forum Windows Programming
    Replies: 19
    Last Post: 10-19-2003, 12:36 AM
  3. adding a line of text to a readonly edit control?
    By Kibble in forum Windows Programming
    Replies: 2
    Last Post: 11-25-2002, 09:04 PM
  4. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM
  5. Outputting String arrays in windows
    By Xterria in forum Game Programming
    Replies: 11
    Last Post: 11-13-2001, 07:35 PM