Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Edit Boxes

timberwolf
Beginner
435 Views
An edit box on a dialog box, how would you make it visible or not visible on the dialog box?

For example:
if a check box is checked then the edit box is visible and if the check box is not checked then the edit box is not visible.

Any help is appreciated. Thanks.
0 Kudos
1 Reply
Jugoslav_Dujic
Valued Contributor II
435 Views
SUBROUTINE OnCheckBoxChange(Dlg,ID,iEvent)
USE DFWIN
...
iret = DlgGet(Dlg, IDC_CHECKBOX, bState)
IF (bState) THEN
iShow = SW_SHOW
ELSE
iShow = SW_HIDE
END IF
iret = ShowWindow(GetDlgItem(Dlg%hWnd, IDC_EDITBOX), iShow)
Also, take a look at XFLOGM extension on my home page -- it has DLG_VISIBLE control index as an extentsion.

(See also this recent reply of mine -- there are issues if you need it at dialog startup).

Jugoslav
0 Kudos
Reply