Standard messages not received

This is a discussion on Standard messages not received within the Windows Programming forums, part of the Platform Specific Boards category; Hi, Okay I have an MDI interface with about 10 different window classes registered and each window class of course ...

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    132

    Standard messages not received

    Hi,

    Okay I have an MDI interface with about 10 different window classes registered and each window class of course having it's own window procedure function. Now one of the types of windows I am creating has an editbox as a child to the window. Now I can type in the editbox fine, but for some reason the window procedure doesn't receive any messages (such as WM_KEYDOWN, WM_KEYUP, WM_CHAR, etc.). I need a message at least similar to these ones so I can try and detect if the enter key is pressed because this window deals with typed in commands on the user's part. So I need to know when they hit enter so then I can deal with the finished typed command.

    Anyone know why I'm not receiving these messages?

    Thanks,
    Tyouk

  2. #2
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    Controls typically send a select group of notification messages to their parent window. They do not pass on all window messages.

    Edit Control Notification Messages

    If you wish to intercept other messages, you must subclass the control. There may be come trick for intercepting ENTER without subclassing as the dialog manager does but I am not sure of details.

  3. #3
    Registered User
    Join Date
    May 2002
    Posts
    132
    Thanks for the reply, I read it thouroughly and to no avail. It states that the WM_KEYDOWN, WM_CHAR and other like messages should be sent to the parent windows procedure function when a user has added input into an editbox. Yet I receive no such messages.

    I can't explain it. When a WM_KEYDOWN message is received I should be able to check wParam for the VK_RETURN value to see if it was the enter key that has been pressed. But I've even tried:

    Code:
    case WM_KEYDOWN:
               MessageBox(NULL, TEXT("somethings being pressed"), TEXT("Key Press Detected"), MB_OK);
               break;
    and yet I never receive that message, no matter what. Nor has the Message Box ever displayed. And this is an MDI interface so I've tried placing it into the windows procedure for both the frame window and the child window that is being used at the time and still nothing. I've done similar tests with testing the WM_COMMAND for a EN_UPDATE and EN_MODIFY messages as well as just checking for a WM_CHAR message.

    It's really weird that I never recieve any messages whatsoever. Perhaps I'm doing something wrong?

    Any ideas would be great,
    Thanks... Tyouk

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. array initialization & C standard
    By jim mcnamara in forum C Programming
    Replies: 2
    Last Post: 09-12-2008, 04:25 PM
  2. Bug in iterator comparison in C++ standard?
    By steev in forum C++ Programming
    Replies: 14
    Last Post: 07-12-2008, 01:02 AM
  3. Replies: 8
    Last Post: 03-08-2008, 08:50 PM
  4. C/C++ standard
    By confuted in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 07-06-2003, 04:22 AM
  5. standard language, standard compiler?
    By doubleanti in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 09-03-2001, 05:21 AM

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