I've been working with the listbox in Firefly version 2.60. I have this line starting at the program start via a timer control. It starts 1 second after the program starts.
ListBox Add hDlg, IDC_FRMForm1_lstWindows, "test"
It will not add the word "test" to the listbox. But if I add a msgbox "my message" before the line above then it will add the word "test" to the listbox.
Any suggestion's.
Thanks,
Gil
Just a follow up. I upgraded to version 2.86 and still have the same problem.
Gil
Looks like you are using DDT commands in FireFly????? FireFly is SDK based, not DDT. Whenever possible you should stick with Win32 API calls (or FireFly's built in functions).
For example, to add a string to a ListBox you would use any of the following (assuming the Form is named FORM1 and the ListBox is called LISTBOX1):
Function FORM1_TIMER1_WM_TIMER ( _
hWndForm As Dword, _ ' handle of Form
wTimerID As Dword _ ' the timer identifier
) As Long
' Use either of these methods:
'(1) FireFly wrapper
FF_ListBox_AddString HWND_FORM1_LIST1, "PlanetSquires"
'(2) FireFly wrapper
FF_ListBox_AddString GetDlgItem(hWndForm, IDC_FORM1_LIST1), "PlanetSquires"
'(3) Win32 API (wrapper)
Listbox_AddString HWND_FORM1_LIST1, "PlanetSquires"
'(4) Win32 API (wrapper)
Local st As String
st = "PlanetSquires"
SendMessage HWND_FORM1_LIST1, %LB_ADDSTRING, 0, ByVal StrPtr(st)
End Function