Wm_keydown/wm_keyup

This is a discussion on Wm_keydown/wm_keyup within the Windows Programming forums, part of the Platform Specific Boards category; I was wondering if anyone could explain to me how I can stop, the enter key when pressed, from creating ...

  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,607
    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

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