This is probably an easy one, but I'm new to the game....
My program I'm writing uses a dialog that simply consists of
a Listbox control, for selecting a company or industry
listed there, with a double-click, plus an "OK" button to close
without picking.
I use the following in the callback to trap the double-clicked
list item:
IF CBCTLMSG=%LBN_DBLCLK THEN 'Select ind/corp. from Form4 list
LISTBOX GET TEXT hForm4&, %FORM4_NEWSLISTBOX4 TO txt$
.... (etc.)
END IF
It works fine, unless the user opens another instance of the
same Form4 dialog (which I use in a number of places). Once that
occurs, I notice that, on the first instance of the dialog, I am
no longer able to trap the double-click, even after closing
the second. The "OK" button still works (using %BN_CLICKED in
a different CALLBACK for Form4), but not the double-click.
Is there any way to "revive" the ability to recognize the
double-click in that situation, or is it simply bad programming
form to allow the user to have multiple instances of the same
dialog open at the same time? (I.e., maybe I should just kill
the first Form4 dialog when the user opens a second copy of it?)
------------------
My program I'm writing uses a dialog that simply consists of
a Listbox control, for selecting a company or industry
listed there, with a double-click, plus an "OK" button to close
without picking.
I use the following in the callback to trap the double-clicked
list item:
IF CBCTLMSG=%LBN_DBLCLK THEN 'Select ind/corp. from Form4 list
LISTBOX GET TEXT hForm4&, %FORM4_NEWSLISTBOX4 TO txt$
.... (etc.)
END IF
It works fine, unless the user opens another instance of the
same Form4 dialog (which I use in a number of places). Once that
occurs, I notice that, on the first instance of the dialog, I am
no longer able to trap the double-click, even after closing
the second. The "OK" button still works (using %BN_CLICKED in
a different CALLBACK for Form4), but not the double-click.
Is there any way to "revive" the ability to recognize the
double-click in that situation, or is it simply bad programming
form to allow the user to have multiple instances of the same
dialog open at the same time? (I.e., maybe I should just kill
the first Form4 dialog when the user opens a second copy of it?)
------------------
Comment