Bug in TMultiGet:bChange

Post Reply
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Bug in TMultiGet:bChange

Post by Enrico Maria Giordano »

This is the sample:

Code: Select all

#include "Fivewin.ch"


FUNCTION MAIN()

    TEST()

    TEST()

    RETURN NIL


STATIC FUNCTION TEST()

    LOCAL oDlg, oBrw

    USE TEST

    DEFINE DIALOG oDlg

    @ 0, 0 LISTBOX oBrw FIELDS

    @ 4, 0 BUTTON "&Close" ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    CLOSE

    RETURN NIL
If you press Enter you will not hear the beep. But you will hear it if you press Esc.

EMG
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Bug in TMultiGet:bChange

Post by Enrico Maria Giordano »

This seems to solve the Enter problem. From KeyChar() method:

Code: Select all

   if nKey == VK_RETURN .and. ;
      lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), ES_WANTRETURN )
      ::oWnd:nLastKey = 0
      if ::bChange != nil
         Eval( ::bChange, nKey, nFlags, Self )
      endif
      return nil
   endif
EMG
Post Reply