03-15-2008, 10:13 AM
Move the code that shows the dialog to the parent dialog's function, or to a third function that the parent dialog calls. Example:
Tips: dialog code in the forum
Or, if you don't need to pass arguments, the parent dialog can call Cash_Count and pass four 0.
---
Simplifying:
Multiple case that have same code can be joined into one:
case [EN_CHANGE<<16|1101,EN_CHANGE<<16|1102,and so on]
Cash_Math hDlg 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1119
-
Don't need to declare so many str variables. Can reuse same variables.
Also could use arrays...
---
Passing result to parent dialog.
If you move ShowDialog etc to the parent dialog, the result will be in e1119. (after closing the counting dialog) (after ShowDialog).
Tips: dialog code in the forum
Or, if you don't need to pass arguments, the parent dialog can call Cash_Count and pass four 0.
---
Simplifying:
Multiple case that have same code can be joined into one:
case [EN_CHANGE<<16|1101,EN_CHANGE<<16|1102,and so on]
Cash_Math hDlg 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1119
-
Don't need to declare so many str variables. Can reuse same variables.
Also could use arrays...
---
Passing result to parent dialog.
If you move ShowDialog etc to the parent dialog, the result will be in e1119. (after closing the counting dialog) (after ShowDialog).