cWndByClass

Obtains the handle of a child window or control based on the window or control class. 

Syntax:

cWndByClass( hWnd, "ControlClass")

Parameters:

(i) hWnd Handle of parent window.

(s) ControlClass Class of window ot control.

Returns:

(i) Handle to the child window or control.

 

This function obtains the handle of a child window or control for use in subsequent operations. The first parameter, hWnd, is a handle obtained via one of these functions:

DllHwnd (See Main WIL documentation)

cWndByClass

cWndByID

cWndByName

cWndBySeq

cWndInfo (some parameter values)

 

Note: cWndByClass accepts 0 or "" as the first parameter, which is the handle of parent window. It will search all top-level windows for the second parameter instead of searching the child windows of parameter 1.

 

Example:

AddExtender("wwctl44i.dll",0,"wwctl64i.dll")

Run("rundll32.exe", "shell32.dll,Control_RunDLL mmsys.cpl") title="Multimedia Properties" multiwnd=DllHwnd(title) tabtitle="Video" systabwnd=cWndbyclass(multiwnd,"SysTabControl32") cSetTabItem(systabwnd,2) ; confirm correct tab videohwnd=cWndbyseq(multiwnd,1) thistitle=cWndinfo(videohwnd,0) If thistitle!=tabtitle    Message("Error","Incorrect tab title")    Exit EndIf Exit

See Also:

cWndByName, cWndBySeq, cWndById, cWndInfo