PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Douglas McDonald on January 14, 2010, 10:24:13 PM

Title: Combobox
Post by: Douglas McDonald on January 14, 2010, 10:24:13 PM
I need to reset the combobox before filling it but it doesn't seem to reset

Function FRMDMM_COMPORT_CBN_SETFOCUS (ControlIndex  As Long,  _  ' index in Control Array
                                     hWndForm      As Dword, _  ' handle of Form
                                     hWndControl   As Dword, _  ' handle of Control
                                     idComboBox    As Dword  _  ' identifier of combobox
                                     ) As Long
Local ret As Long
FF_ComboBox_ResetContent(hwndform )
ret = FillComm(hwndform) 'get comport info
End Function


lets say com1 & com2 was in the combobox list, I added comXX via 'ret = FillComm(hwndform) 'get comport info'

I click on (set Focus) the combobox

Why isn't the combobox reset (cleared) and filled including the added com port?

Thanks
Doug

Title: Re: Combobox
Post by: José Roca on January 14, 2010, 10:37:50 PM
You have to use the handle of the control (hWndControl), not the one of the form.
Title: Re: Combobox
Post by: Douglas McDonald on January 15, 2010, 08:58:39 AM
It must have been too late last night. I looked at that 20 times and just plain missed it. I'm usually very careful to check and recheck before I post a question. Stupid of me. Sorry to waste your time.

Doug