Thread: HEEELP!!! More On Capturing VK_RETURN...

  1. #1
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708

    HEEELP!!! More On Capturing VK_RETURN...

    Here's my problem:

    I have in my one and only window procedure, a case handler for VK_RETURN.

    When you press enter, it pops up a message box.

    When you press enter after clicking in an edit box, no message box.

    If you then minimize, then maximize the window, pressing enter pops up the message box!


    So. Somehow, after you change the focus to an edit control, the VK_RETURN message is either:

    - not being generated.(not likely)

    - not being sent down the switch statement (likely, I suppose)

    But where is it being sent? There is only one window procedure!!!

    Shouldn't all messages be reaching this procedure?!

    I just don't get it.

    Please help me!!!
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  2. #2
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,227
    you're forgetting that each control is its own window. a return statement while focus is set on an edit control will send it in a Wparam (or Lparam, not sure) to that edit box and not the main window procedure...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Capturing control-key sequences
    By cunnus88 in forum C++ Programming
    Replies: 5
    Last Post: 10-17-2007, 12:44 PM
  2. Image Capturing
    By Daedalsu AI in forum C++ Programming
    Replies: 1
    Last Post: 11-19-2005, 10:46 PM
  3. capturing mouse events
    By leojose in forum Windows Programming
    Replies: 7
    Last Post: 06-06-2005, 10:36 PM
  4. Capturing key presses
    By cgod in forum Windows Programming
    Replies: 6
    Last Post: 11-25-2004, 01:10 PM
  5. Capturing key stokes
    By subdene in forum C++ Programming
    Replies: 20
    Last Post: 08-13-2002, 03:51 PM