cSetTABItem

Selects a tab from a tabbed dialog.

Syntax:

cSetTABItem( hwnd, item)

Parameters:

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

(i) item Item number to set (first one is 1), i.e., the item's location in a list whose first item is item #1.

Returns:

(i) 0 always.

 

This function is designed select a tab from a tabbed dialog.

 

Example:

AddExtender("wwctl44i.dll",0,"wwctl64i.dll")
Run( 'rundll32.exe', 'shell32.dll,Control_RunDLL mmsys.cpl' )
title = 'Sounds and Audio Devices Properties'
ret = WinWaitExist( title, 5 )
If ret == 0
   Message( 'Notice', 'Window Not Found: ': title)
   Exit
EndIf
; select the third tab
parenthwnd = DllHwnd( title )
systabwnd = cWndbyclass( parenthwnd, 'SysTabControl32' )
cSetTabItem( systabwnd, 3 )
; confirm correct tab
audiohwnd = cWndbyseq( parenthwnd, 1 )
thistitle = cWndinfo( audiohwnd, 0 )
If thistitle != 'Audio'
   Message( 'Error', 'Incorrect tab title' )
   Exit
EndIf
Exit

See Also:

cRadioButton, cCheckBox, cSetEditText