'combo combobox find exact
'   找到组合框中完全匹配搜索文本的第一个索引号。
'   搜索区分大小写字母。
'   hWndControl: 控件的句柄 (例如  HWND_FORM1_COMBO1)                  
'   nIndex:      The zero-based index of the item before the first
'                item to be searched. When the search reaches the
'                bottom of the list, it continues from the top of
'                the list until it reaches the nIndex position. If
'                nIndex = -1 then the entire list is searched from
'                the beginning.             
'   SearchText:  The string that contains the text to search for.
'   Returns:     The return value is the index of the matching item.
'                If an error occurs, %CB_ERR is returned.
'------------------------------------------------------------------
Function FF_ComboBox_FindStringExact(hWndControl as HWnd, nIndex as Long, SearchText as CWSTR) as Long
   
   '检查窗口句柄是否有效
   If IsWindow(hWndControl) Then
      ''发消息给控件
      Function = SendMessage(hWndControl, CB_FINDSTRINGEXACT, 0, Cast(LPARAM, SearchText.vptr))
   Else
      Function = CB_ERR
   End If
   
End Function

