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

Why I can't always write a text to Static Text, Give me a help!

lyricx
Beginner
352 Views
PROGRAM DISPLAY_ITERS
USE DFLOGM
IMPLICIT NONE
INCLUDE 'RESOURCE.FD'
INTEGER retint
LOGICAL retlog
TYPE (dialog) dlg
character*256 wtext, rtext


! Initialize.
IF ( .not. DlgInit(IDD_DIALOG1,dlg) ) THEN
WRITE (*,*) 'Error: dialog not found'
ELSE
write(wtext,*) "SQMR"
write(11,*) wtext
retlog = DlgSet( dlg, IDC_STATIC1_1, wtext )
write(11,*) ' SET IDC_STATIC1_1 ', retlog
retlog = DlgSet( dlg, IDC_STATIC1_2, wtext)
write(11,*) ' SET IDC_STATIC1_2 ', retlog
retlog = DlgSet( dlg, IDC_STATIC1_3, wtext)
retlog = DlgSet( dlg, IDC_STATIC1_4, wtext )
retlog = DlgSet( dlg, IDC_STATIC1_5, wtext )
write(11,*) ' SET IDC_STATIC1_5 ', retlog
retlog = DlgSet( dlg, IDC_STATIC1_6, wtext )
retlog = DlgSet( dlg, IDC_STATIC2_1, .TRUE.)
retlog = DlgSet( dlg, IDC_STATIC2_1, "100" )
!
retlog = DlgGet( dlg, ID_BUTTON_CANCEL,rtext )
write(11,*) rtext
retint = DlgModal(dlg)
call DlgUninit(dlg)
write(*,*)' At end of program. Hit to exit.'
read(*,*)
END IF
END PROGRAM DISPLAY_ITERS


! ---------------- write(11,*) ' SET IDC_STATIC1_5 ', retlog
! ---------------- always print "F".
! ------------ retlog = DlgGet( dlg, ID_BUTTON_CANCEL,rtext )
! write(11,*) rtext
! ------------- always give another static text with another ID

0 Kudos
2 Replies
jimdempseyatthecove
Honored Contributor III
352 Views

I had a problem where changing my dialog box caused the new IDC_...'s to get concatinated to the .FD file while leaving the old definitions in. This resulted in multiple definitions for some of the ID's.

I would suggest stripping the contents of the .FD file (start with blank .FD file and not a missing .FD file) then recompiling the resouce. This should freshen the .FD file with one set of declarations for each IDC_...

Jim Dempsey

0 Kudos
lyricx
Beginner
352 Views
thanks, settled!
0 Kudos
Reply