Thread: Wm_keydown/wm_keyup

  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    288

    Wm_keydown/wm_keyup

    I was wondering if anyone could explain to me how I can stop, the enter key when pressed, from creating a new line in a multiline edit control

    for example:

    I have a multiline edit control, i want it so that when the user presses enter, it doesnt create a new line, but instead it does a different command which i already specified

    I subclassed the control and handled the WM_KEYDOWN message like so:

    Code:
    case WM_KEYDOWN:
    {
    if (wParam == VK_RETURN)
    {
    return 0;
    }
    break;
    }

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    You've already posted how to do it.
    Does that not work?

    Check out the links I posted in this thread on subclassing.

    gg

  3. #3
    Registered User
    Join Date
    Aug 2003
    Posts
    288
    hey thanx,

    after all this time of programming youd think id know how to subclass lol

    it was just 1 lil mispelled parameter, but thanx anyways

Popular pages Recent additions subscribe to a feed