Combobox

Started by Douglas McDonald, January 14, 2010, 10:24:13 PM

Previous topic - Next topic

Douglas McDonald

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

Doug McDonald
KD5NWK
www.redforksoftware.com
Is that 1's and 0's or 0's and 1's?

José Roca

You have to use the handle of the control (hWndControl), not the one of the form.

Douglas McDonald

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
Doug McDonald
KD5NWK
www.redforksoftware.com
Is that 1's and 0's or 0's and 1's?