hello,
how can i activate input values entered by a user in a dialog box? and how can i display a calculated value in an edit box or a location in the window? need these for now...
how can i activate input values entered by a user in a dialog box? and how can i display a calculated value in an edit box or a location in the window? need these for now...
链接已复制
1 回复
It is all in the documentation. Use DLGGETINT, DLGGETCHAR to get the
INTEGERs or CHARACTER strings that are entered,
do Internal reads to convert numbers as character strings
to Integers or floating-point numbers in order to do
some computations with them, then do internal WRITES to
convert integers, reals etc. to character-strings that
you can then output to dialogs using DLGSET. For example
INTEGERs or CHARACTER strings that are entered,
do Internal reads to convert numbers as character strings
to Integers or floating-point numbers in order to do
some computations with them, then do internal WRITES to
convert integers, reals etc. to character-strings that
you can then output to dialogs using DLGSET. For example
INTEGER*4 SLIDE1, SLIDE2, SLIDE3 REAL*8 A1,A2,A3 CHARACTER*256 ANG1,ANG2,ANG3,A1CHAR,A2CHAR,A3CHAR INTEGER*4 INTA1,INTA2,INTA3 .... .... CASE(IDC_ANGLE2_SLIDER) retlog=DLGGETINT(dlg, IDC_ANGLE2_SLIDER, SLIDE2, DLG_POSITION) ! WRITE(*,*) 'ANGLE 2 SLIDER = ',SLIDE2 INTA2=2*(SLIDE2-1) A2=INTA2 WRITE(ANG2,*)INTA2 retlog=DLGSET(dlg, IDC_ANGLE2,TRIM(ADJUSTL(ANG2)), DLG_STATE) retlog=DLGSET(dlg, IDC_ANGLE2,.TRUE., DLG_ENABLE) ... ... CASE(IDC_ANGLE2) !WRITE(*,*) 'ANGLE 2 SET ' !GET THE ANGLE retlog=DLGGET(dlg, IDC_ANGLE2,ANG2,DLG_STATE) A2LENG=LEN_TRIM(ANG2) A2=0 IF(A2LENG.GT.0) READ(ANG2,*) A2 SLIDE2=(INT(A2+0.1)/2)+1 retlog=DLGSET(dlg, IDC_ANGLE2_SLIDER, SLIDE2, DLG_POSITION)HTH