cSetCBItem

Sets a single item in a standard Combobox. 

Syntax:

cSetCBItem( hwnd, item)

Parameters:

(i) hwnd Combobox handle from a cWndBy... function.

(i) item Item number to set (first one is 1).

Returns:

(i) 1 if successful, 0 on failure

 

This function is designed to set a single item in a standard Combobox.

 

Example:

AddExtender("wwctl44i.dll",0,"wwctl64i.dll")
;Note: This example designed for Windows 95
Run("rundll32.exe", "shell32.dll,Control_RunDLL netcpl.cpl")
netwnd=DllHwnd("Network")
cfghwnd= cWndbyname(netwnd,"Configuration")
cbWnd=cWndbyid(cfghwnd,405)
response=cGetCBText(cbwnd)
logon=ItemLocate("Windows Logon", response, @TAB)
If logon==0
   Message("Windows Logon","Not Found")
Else
   cSetCbItem(cbwnd,logon)
   Message("Windows Logon","Selected")
EndIf
Exit

See Also:

cSetLBItem, cGetCBText