get_next_dialog_group_item


handle get_next_dialog_group_item(handle window,
                                  handle control,
                                  bool previous)

This function obtains the next or previous item in a group of controls.

Parameters

handle window

The handle of the parent window - usually a dialog box.

handle control

The handle of a reference control window. The returned window is either before or after this window. If null is specified, the first or last item in the group is returned.

bool previous

true The group item that precedes the specified window is returned.
false The group item that follows the specified window is returned.

Return

handle

null The call failed.
Other The window that precedes or follows the given window.

Notes

Controls are searched in the order (or reverse order) of their creation within in a dialog box template. The first control in the group has the style style::group and all other controls do not have the group style.

When searching for a previous control, the first control that is visible and not disabled is returned. If the given control has the style style::group, the search is temporarily reversed to locate the first control having the group style. The search is then resumed in the original direction, returning the first control that is visible and not disabled. The given control window handle is returned when no such control is found.

When searching for the next control, the first control that is visible, not disabled and is without the style style::Group is returned. If a control having the group style is encountered, the search is reversed to locate the first control having the group style - which is returned if it is visible and not disabled. Otherwise, the search is resumed in the original direction and the first control that is visible and not disabled is returned. If no such control can be found, the given control window handle is returned.