'combo combobox current selection
'   滚动视图到当前选定的项。
'   hWndControl: 控件的句柄 (例如  HWND_FORM1_COMBO1)                  
'   nIndex:      要选择的字符串的从零开始的索引。
'   Returns:     If an error occurs, %CB_ERR is returned.
Function FF_ComboBox_SetCurSel(hWndControl as HWnd, nIndex as Integer) as Integer
   
   '检查窗口句柄是否有效
   If IsWindow(hWndControl) Then
      ''发消息给控件
      Function = SendMessage(hWndControl, CB_SETCURSEL, nIndex, 0)
   Else
      Function = CB_ERR
   End If
   
End Function

