_qres::Enumerate_Res_Popup_Controls - Get All Controls for a Given Popup Menu

Syntax

call "_qres::Enumerate_Res_Popup_Controls",reshandle,popup_id,control_list$,status,errmsg$

Description

In BBj 4.0 and higher, this routine returns a list of all controls on the specified form in a resource.

Parameter

Description

reshandle

The handle on which the target resource is opened.

popup_id

The ID of the popup menu on which the target controls reside.

child_list$

Returns a string that contains a list of all the controls on the specific popup menu. Each control will have an entry that contains the type of control (as specified in CTRL(4)), popup menu ID, control name, control ID, and x, y, w, h. Each control segment is formatted with the following template:

Temp$="Type:n(2*=0),Window_id:c(16*=0),Name:C(30*=0),
Ctl_id:C(3*=0),x:n(3*=0),y:n(3*=0),w:n(3*=0),h:n(3*=10)"

All fields are terminated with null and the height field (h) is terminated with a $0A$.

Popup menus can only contain menu items (type 100 or 101). The values for x, y, w and h will always be 0.

status

Returns 1 for successful operation and 0 for unsuccessful operation.

errmsg$

In the case of unsuccessful operation, this returns a description of the problem encountered.

This routine does not check to see if there is enough memory to get the window information (WININFO). An error 31 may result in cases where the window being evaluated is very complex and contains many controls.