Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
#DefineSubRoutine Main(Proc_Handle,Proc_Message,Proc_ID, Proc_EventInfo, reserved) ;DialogprocOptions Constants MSG_INIT = 0 ; The one-time initialization MSG_TIMER = 1 ; Timer event MSG_BUTTONPUSHED = 2 ; Button press. ; New options for DialogObject DLGOBJECT_ADDEVENT = 1 ;DialogObject add event DLGOBJECT_REMOVEVENT = 2 ;DialogObject remove event DLGOBJECT_GETOBJECT = 3 ;DialogObject get reference to object DLGOBJECT_GETPICTURE = 4 ;DialogObject get a picture object ; New callback message MSG_COMEVENT = 14 ;COM control event fired ; Switch Proc_Message Case MSG_INIT document = DialogObject(Proc_Handle, 003, DLGOBJECT_GETOBJECT) document.open() document.writeln(`<p><input type="submit" value="Show Message" id="PushMeButton" /> <input type="submit" value="Clear" id="ClearButton" /></p>`) document.writeln(`<div id="MultiLineDiv" />`) document.close() document.body.style.overflow = "hidden" document.body.style.backgroundcolor = "#ece9d8" DialogObject(Proc_Handle, 003, DLGOBJECT_ADDEVENT, "onclick", 1) ;setup a MSG_COMEVENT DialogProcOptions(Proc_Handle, MSG_BUTTONPUSHED, 1) DialogProcOptions(Proc_Handle, 1002, 4) ; DialogProcOptions(Proc_Handle, 1, 500) ; setup a MSG_TIMER Return(-1) Break Case MSG_BUTTONPUSHED ; blank... Break Case MSG_COMEVENT ; Test in case more events or COM controls are added later If Proc_EventInfo.identifier == 1 && Proc_ID == 003 ; Get event source object associated with the event Element = document.parentWindow.event.srcElement If Element.id == "PushMeButton" GreenStr = StrCat("<font color=green>", "File Copied from C:\Test...successful","</font>", "<br><br>") RedStr = StrCat("<font color=red>", "FILE NOT FOUND: C:\Test\Somefile.txt","</font>", "<br>") document.getElementByID("MultiLineDiv").innerHTML = StrCat(GreenStr, RedStr) EndIf If Element.id == "ClearButton" Then document.getElementByID("MultiLineDiv").innerHTML = "" Element = 0 EndIf Break EndSwitch ; Proc_Message Return(-1) ; Do default processing #EndSubRoutine ; End of Dialog Callback ExamProc MyDialogFormat=`WWWDLGED,6.1` MyDialogCaption=`MSHTML Test` MyDialogX= -1 MyDialogY= -1 MyDialogWidth=247 MyDialogHeight=289 MyDialogNumControls=003 MyDialogProcedure=`Main` MyDialogFont=`DEFAULT` MyDialogTextColor=`DEFAULT` MyDialogBackground=`DEFAULT,DEFAULT` MyDialog001=`011,267,036,012,PUSHBUTTON,DEFAULT,"OK",1,1,32,DEFAULT,DEFAULT,DEFAULT` MyDialog002=`193,267,036,012,PUSHBUTTON,DEFAULT,"Cancel",0,2,DEFAULT,DEFAULT,DEFAULT,DEFAULT` MyDialog003=`005,009,232,252,COMCONTROL,DEFAULT,"MSHTML:" ,DEFAULT,3,DEFAULT,DEFAULT,DEFAULT,DEFAULT` ButtonPushed=Dialog("MyDialog")
Article ID: W17778
Filename: Colored Multi Line Dialog.txt
File Created: 2008:11:25:12:18:28
Last Updated: 2008:11:25:12:18:28