Intel® Fortran Compiler 17.0 Developer Guide and Reference
Dialog Functions: Return the state of the dialog control variable.
USE IFLOGM
result = DLGGET (dlg,controlid,value[,index])
result = DLGGETINT (dlg,controlid,value[,index])
result = DLGGETLOG (dlg,controlid,value[,index])
result = DLGGETCHAR (dlg,controlid,value[,index])
dlg |
(Input) Derived type dialog. Contains dialog box parameters. The components of the type dialog are defined with the PRIVATE attribute, and cannot be changed or individually accessed by the user. |
controlid |
(Input) Integer. Specifies the identifier of a control within the dialog box. Can be either the symbolic name for the control or the identifier number, both listed in the Include file (with extension .FD). |
value |
(Output) Integer, logical, or character. The value of the control's variable. |
index |
(Input; optional) Integer. Specifies the control variable whose value is retrieved. Necessary if the control has more than one variable of the same data type and you do not want to get the value of the default for that type. |
The result type is LOGICAL(4). The result is .TRUE. if successful; otherwise, the result is .FALSE..
Use the DLGGET functions to retrieve the values of variables associated with your dialog box controls. Each control has at least one of the integer, logical, or character variable associated with it, but not necessarily all. For information about the location of a document that contains lists of index variables for each control type, see Additional Documentation: Creating Fortran Applications that Use Windows* Features.
You can use DLGGET to retrieve the value of any variable. You can also use DLGGETINT to retrieve an integer value, or DLGGETLOG and DLGGETCHAR to retrieve logical and character values, respectively. If you use DLGGET, you do not have to worry about matching the function to the variable type. If you use the wrong function type for a variable or try to retrieve a variable type that is not available, the DLGGET functions return .FALSE..
If two or more controls have the same controlid, you cannot use these controls in a DLGGET operation. In this case the function returns .FALSE..
The dialog box does not need to be open to access its control variables.
USE IFLOGM
INCLUDE "THISDLG.FD"
TYPE (DIALOG) dlg
INTEGER val
LOGICAL retlog, is_checked
CHARACTER(256) text
...
retlog = DLGGET (dlg, IDC_CHECKBOX1, is_checked, dlg_status)
retlog = DLGGET (dlg, IDC_SCROLLBAR2, val, dlg_range)
retlog = DLGGET (dlg, IDC_STATIC_TEXT1, text, dlg_title)
...