'listbox selection
'   返回一个列表框中的当前选定项的索引。多选时不能使用此函数。
'   hWndControl: 控件的句柄 (例如  HWND_FORM1_LISTBOX1)
'   Returns:     The zero-based index of the currently selected item.
'                Returns %LB_ERR if there is no current selection.
Function FF_ListBox_GetCurSel( ByVal hWndControl As HWND ) As Long
    
    '检查窗口句柄是否有效
    If IsWindow(hWndControl) Then  
       ''发消息给控件
       Function = SendMessage( hWndControl, LB_GETCURSEL, 0, 0)
    Else
       Function = LB_ERR
    End If  
    
End Function             

