Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
14 Views

unknown bug !!

hi,

i re- post this topic cause i don't receive any answer and i need your help please .

i'm using the resource editor to create a calucator program, so when i run the program all are ok, then when i display a dialog box and put all data of my problem then i validate the data and close the dialog box, when i re open it all the data are deleted and initilized to the initial value !

so what shall i do to keep my parameters even after closing the dialog box ? 

for information,i saw a similar program to  mine who use a dialog box to input data and i follow how he write his program it similar to mine !! so i don't know where is the problem !

 

Arezki Salem 

0 Kudos
8 Replies
Highlighted
Black Belt
14 Views

You are asking questions that pertain to writing a Windows GUI program. It is not evident whether the questions have any relation to using the Intel Fortran compiler, which is the focus of this forum. Secondly, you may induce someone to answer if you showed some code, since your verbal description is rather vague. You may be better off if you posted in a forum dedicated to Windows programming.

0 Kudos
Highlighted
Black Belt Retired Employee
14 Views

Or maybe attach a ZIP of a small sample project (with a simple dialog that has one control) that illustrates the problem, so we can see what you are or are not doing. We are not mind readers (well, most of us, anyway.)

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
Beginner
14 Views

hi 

so when i run the program and click on ( EDIT--->dialog to display ) , then i write parametres on  the edit boxes and click ok , after that when i want to re-opening my dialog box the parametres that i insered earlier will deleted , and it display the initial values ,and i want to when i re-open the dialog box i found the my parametres and not initial values 

(sorry for the  bad english i try to develop it )

i attached a zip : 

 

0 Kudos
Highlighted
Beginner
14 Views

hi DOCTOR , 

what do you recommend to me ??

Regards,

Arezki Salem 

0 Kudos
Highlighted
Black Belt Retired Employee
14 Views

I don't know how to use your program to reproduce whatever problem you are seeing. I tried the calculatrice menu item, which appeared to be what you were asking about. As soon as I entered a digit in one of the fields, the program exited with a list-directed I/O error because the "text" field was blank.

If I look at subro.f90 where this dialog is processed, it seems to want to "read" values into variables a, b, computes value c, and then sets the third control to that value. But it does nothing to save the values for use in later displays of the dialog.

I'm not really an expert on dialog box programming, though I have done it in the past.

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
Beginner
14 Views

hi , 

so doctor do you have any idea about how to save the value ? 

regards

Arezki Salem 

0 Kudos
Highlighted
Black Belt Retired Employee
14 Views

I don't know what you want your program to do. Maybe you could declare variables in the module so that they don't go away, but you'd also need to rewrite them into the dialog controls when you bring the dialog back again. 

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
Valued Contributor III
14 Views

Firstly your callback routine showresult (dlg,control_name) has only two args it should have three showresult( dlg, id, callbacktype )

You should make a call back  for the dialog name itself ie bret=dlgsetsub(dlg,IDD_DIALOG3,showresult)

Then in the callback have 

...
CASE(IDD_DIALOG3)
   if (callbacktype == DLG_DESTROY) ! this will happen when the dialog is closed
       ! get dialog values and put them in saved variables
   endif
CASE(idc_button1)
.....

Then next time  you create the dialog initialise with the saved values

0 Kudos