Bs_defpushbutton

This is a discussion on Bs_defpushbutton within the Windows Programming forums, part of the Platform Specific Boards category; Besides putting the default shade on the button, what does this do? I thought that it kinda handles the "Enter". ...

  1. #1
    Unregistered
    Guest

    Bs_defpushbutton

    Besides putting the default shade on the button, what does this do? I thought that it kinda handles the "Enter". For instance, if my focus is on an edit (the same window) and I type a word, and then (still with focus on the edit) I hit "Enter" the DEFPUSHBUTTON would receive the enter. How would I do this?

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,786
    Have you tried ES_WANTRETURN as a style for the edit?

    If that doesnt do it you could subclass the edit and filter for VK_RETURN and then discard them

  3. #3
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,854
    Make sure you use the MULITLINE style for the edit if you want to use ES_WANTRETURN (to set RETURN!=DEF_BUTTON)
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

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