Archived Boards > WinBatch Dynamic Dialogs

Invoke a Dialog Callback Procedure From Within a Dialog Callback Procedure?

<< < (6/6)

td:
Included file 'Dlgtemp.wbt"


--- Code: Winbatch ---MyDialogFormat=`WWWDLGED,6.2`

MyDialogCaption=`WIL Dialog 1`
MyDialogX=906
MyDialogY=091
MyDialogWidth=313
MyDialogHeight=223
MyDialogNumControls=002
MyDialogProcedure=`DEFAULT`
MyDialogFont=`DEFAULT`
MyDialogTextColor=`DEFAULT`
MyDialogBackground=`DEFAULT,DEFAULT`
MyDialogConfig=2

MyDialog001=`082,207,034,011,PUSHBUTTON,"PushButton_OK",DEFAULT,"OK",1,10,@csDefButton,DEFAULT,DEFAULT,DEFAULT`
MyDialog002=`198,207,033,011,PUSHBUTTON,"PushButton_Cancel",DEFAULT,"Cancel",0,20,DEFAULT,DEFAULT,DEFAULT,DEFAULT`

ButtonPushed=Dialog("MyDialog",0) ; WinBatch will not display this dialog.
Including script:


--- Code: Winbatch ---#include Dlgtemp.wbt

#DefineSubroutine Useless()

   return Dialog("MyDialog")
#EndSubroutine

; Display an included dialog
nReturn = Useless()
 

JTaylor:
Thank you for pointing out something that should have been obvious.   One of those things where one starts out doing something one way and assumes that is how it has to be done. 

Jim

JTaylor:
Just to make sure I am not missing something...wouldn't this do the same thing or is something gained with the SubRoutine?

Jim


--- Code: Winbatch ---Code: Winbatch
#include Dlgtemp.wbt

; Display an included dialog
nReturn = Dialog("MyDialog")

 

td:
Yes, it would be the same.   I just use a subroutine to connect the example to the rest of the topic.

JTaylor:
Thought so but since I have been oblivious for 20 years I thought I should ask  :)

Jim

Navigation

[0] Message Index

[*] Previous page

Go to full version