;;; mxdemo.ss -- demo program for MysterX
;;; Requires the MSCal Calendar control.
;;; The calendar control is normally installed with
;;; MS Office, but it can also be downloaded from
;;; elsewhere. Look for "mscal.ocx".
(module mxdemo mzscheme
(require (lib "class.ss"))
(require (lib "mysterx.ss" "mysterx"))
(require (lib "runtime-path.ss")
(lib "system.ss"))
;; Ensure that DLLs are included with the distibution:
(define-runtime-path myspage-dll (so "myspage"))
(define-runtime-path myssink-dll (so "myssink"))
;; Register them every time we start:
(system* "regsvr32.exe" "/s" myspage-dll)
(system* "regsvr32.exe" "/s" myssink-dll)
; the browser with the calendar
(define calwb (instantiate mx-browser%
() ; no by-position initializers
(label "Calendar control")
(height 400)
(width 350)
(y 100)
(x 100)
(style-options '(scrollbars))))
(define caldoc (send calwb current-document))
(send caldoc insert-html
(string-append
"