Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function retrieves the handle to the first control in a group of controls that precedes or follows the specified control in a dialog box.
Syntax
HWND GetNextDlgGroupItem( HWND hDlg, HWND hCtl, BOOL bPrevious ); |
Parameters
- hDlg
-
[in] Handle to the dialog box being searched.
- hCtl
-
[in] Handle to the control to be used as the starting point for the search. If this parameter is NULL, the function uses the last (or first) control in the dialog box as the starting point for the search.
- bPrevious
-
[in] Boolean that specifies how the function is to search the group of controls in the dialog box. If this parameter is TRUE, the function searches for the previous control in the group. If it is FALSE, the function searches for the next control in the group.
Return Value
The handle of the previous or next control in the group of controls indicates success. NULL indicates failure. To get extended error information, call GetLastError.
Remarks
The GetNextDlgGroupItemfunction searches controls in the order (or reverse order) they were created in the dialog box template. The first control in the group must have the WS_GROUP style; all other controls in the group must have been consecutively created and must nothave the WS_GROUP style.
When searching for the previous control, the function returns the first control it locates that is visible and not disabled. If the control specified by hCtlhas the WS_GROUP style, the function temporarily reverses the search to locate the first control having the WS_GROUP style, then resumes the search in the original direction, returning the first control it locates that is visible and not disabled, or returning hwndCtrlif no such control is found.
When searching for the next control, the function returns the first control it locates that is visible, not disabled, and does nothave the WS_GROUP style. If it encounters a control having the WS_GROUP style, the function reverses the search, locates the first control having the WS_GROUP style, and returns this control if it is visible and not disabled. Otherwise, the function resumes the search in the original direction and returns the first control it locates that is visible and not disabled, or returns hCtlif no such control is found.
Requirements
Header | winuser.h |
Library | Dlgmgr.lib |
Windows Embedded CE | Windows CE 1.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |