Kyle Zhong wrote:
dlgProc(dial, WM_COMMAND{notifyCode = 0, wId=1 (* OK button *), ...}, ()) = (* When the OK button is pressed we end the dialogue. *)
let val _=EndDialog(dial, 1); val tempValue = "Hello"; in (LRESINT 0, ()) end
I have made a dialog box and I want to define a variable "tempValue" assigned by value "Hello" when I close the dialog box. But the variable could not be defined after I closed the dialog box. Please help me out.
Perhaps I'm wrong but it looks as though you've tried to extend the example in the documentation without understanding the scope rules of Standard ML. "tempValue" is defined only for the scope of the "let in end". You need to assign to a global reference to get the effect you want.
David.