"McKirahan" <Ne**@McKirahan.com> wrote in message news:<cn54d.1090$He1.78@attbi_s01>...
"Nou Dadoun" <da****@cs.ubc.ca> wrote in message
news:ae**************************@posting.google.c om... I'm currently developing an application in C++/MFC (Visual Studio 6,
if that makes a difference) and I'd like to avoid the Windows style UI
widgets and dialogs if at all possible.
In fact, what I'd really like to do is use HTML/web pages as the user
interface and invoke my application in the background to do the heavy
lifting. I'm fairly well experienced with web pages and I've written
a fair amount of JavaScript at one time or another (I taught several
undergrad courses using it actually) but I don't know anything about
its capabilities when it comes to interfacing with or controlling
external applications.
I'll likely be running IE on a Windows box (you can put it into full
screen no-toolbar mode) and here's the question: Can I use client-side
javascript to invoke and/or control my application? I know that
normally javascript can't play outside its own sandbox (i.e. no
filesystem access etc.) for security reasons, but I've seen in the MS
JScript documentation that it's possible to use something called
'unsafe' mode. And since it will only be using web pages on the local
file system, I'm comfortable with that.
Does anyone have experience with this? Do I have to expose hooks to
the app with COM or ActiveX or anything? (something I've used but
haven't directly written before so it's possible). Am I crazy? Is
there a better way to do this?
I'd appreciate any advice or pointers, thanks ... N
Nou Dadoun
Look into HTA (HTML Applications)!
http://msdn.microsoft.com/library/de...thor/hta/overv
iew/htaoverview.asp
Can you be more specific about your application?
Thanks for the pointers to HTA (to Robert as well), that's a
technology that I'd never tripped over before. Rename a web page and
get an application, who'd a thunk it?
A few questions though, it looks like a good prototyping tool for
doing quick and dirty UI mockups but I don't see immediately (I'm
still looking, of course) how it might be used as a real application
interface for an existing application. i.e. is there any 'exposed'
object model (that is, exposed to external apps)? Is there a file i/o
mechanism, I'm not familiar with one in client-side javascript and I
don't see an immediate connection to server-side js (which I've never
used admittedly)? Are there other hooks or pointers that aren't
immediately obvious? Does anyone have any actual experience using
HTAs? Caveats? Mudholes?
I can't go into a lot of detail about my app but it's actually two
entirely separate applications, an image acquisition app which
controls some USB cameras and writes images to disc and an image
analysis app which does some processing and reporting on the saved
images. The two currently communicate using the image files and a DDE
mechanism (based on legacy code in the analysis app) to trigger the
analysis but are otherwise entirely separate.
Part of my goal in having an html front end is to use it to do some of
the integration, i.e. ditch the DDE, have the front end trigger the
acquisition/storage and subsequently the analysis under user control.
But if retaining the DDE is simpler for a quick implementation, that's
ok too (for the time being).
Thanks again for any pointers ... N
PS. Running an Apache server on a windows box for an app UI running
on the same machine seems like a lot of overhead (there are some
performance issues with the applications already) but if there's a
serious case to be made for going that route (cgi? server-side js?)
for a working prototype, I'm certainly open to hearing it, thanks ...
N