11-09-2007, 02:13 AM
If you encrypt a macro that contains a dialog definition, the dialog will not work, because dialog functions cannot decrypt it to take the dialog definition. You can either place the dialog definition in a nonencrypted macro, or store the dialog definition in a variable and use flag 2 with ShowDialog.
Example:
str dd=
;BEGIN DIALOG
;0 "" 0x10C80A44 0x100 0 0 109 50 "Form"
;3 Edit 0x54030080 0x200 6 8 96 14 ""
;1 Button 0x54030001 0x4 4 32 48 14 "OK"
;2 Button 0x54030000 0x4 56 32 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2010507 "*" ""
str controls = "3"
str e3
if(!ShowDialog(dd 0 &controls 0 2)) ret
out e3
So the Answer is yes, as long as you do it the right way, but you may have some restrictions.
Example:
str dd=
;BEGIN DIALOG
;0 "" 0x10C80A44 0x100 0 0 109 50 "Form"
;3 Edit 0x54030080 0x200 6 8 96 14 ""
;1 Button 0x54030001 0x4 4 32 48 14 "OK"
;2 Button 0x54030000 0x4 56 32 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2010507 "*" ""
str controls = "3"
str e3
if(!ShowDialog(dd 0 &controls 0 2)) ret
out e3
So the Answer is yes, as long as you do it the right way, but you may have some restrictions.
Taking on Quick Macros one day at a time
