Announcement

Collapse
No announcement yet.

Buttons & ENTER Key

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • David Hoff Jr
    replied
    Thanks. It bives me something to work with now.

    Leave a comment:


  • Michael Mattias
    replied
    <ENTER> sends WM COMMAND/IDOK, unelss there is a current default pushbutton, in which case it sends WM_COMMAND/that control.

    Easiest way to handle is to convert WM_COMMAND/IDOK to the control wth the focus:

    Code:
       CASE %WM_COMMAND
            IF LOWRD(wParam) = %IDOK THEN 
                   PostMessage  GetFocus(), %BM_CLICK, %NULL, %NULL 
                   FUNCTION = 0 
                   EXIT FUNCTION
               .....

    Leave a comment:


  • Fred Buffington
    replied
    You might try an %IDOK in the callback to process the Enter key. Get
    the id of the button and then use sendmessage depending on your code.

    I know that doesn't answer your question but it might solve your situation.
    Last edited by Fred Buffington; 28 Mar 2009, 03:21 PM.

    Leave a comment:


  • David Hoff Jr
    started a topic Buttons & ENTER Key

    Buttons & ENTER Key

    I have a Name/Address/Phone List program with 15 Textboxes and 4 Buttons. The buttons respond correctly to mouse clicks and accelerator keys. But, if I use the tab key to move to the first button, or Shift Tab to move to the last button and then press the ENTER key, I do not get a consistant response. The first time the button responds correctly, the second time it does not. Am I missing or not handling a CBCTLMSG or does this require Sub Classing.
Working...
X