;;; 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 mzlib/class)
(require mysterx)
(require mzlib/runtime-path
mzlib/process)
;; 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" (path->string myspage-dll))
(system* "regsvr32.exe" "/s" (path->string 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
"