PDA

View Full Version : ATL: a little script to think about



ErosOlmi
10-09-2007, 00:03
I was experimenting with ATL container and produced the attached script. mmmm ;D
Situation is still confused but a lot to think about possible implementations of UI module.

Ciao
Eros


PS: you need latest thinBasic preview version 1.4.0.1 installed.
Should work only on Win2K or above OS

kryton9
10-09-2007, 06:42
I am not sure how this is done Eros, but really cool. All three worked fine, I would get a javascript error at times, but if you just say NO it still continues on fine. I don't think javascript has anything to do with your app, but from the websites doing something or trying to run something.

Neat that so much can be done in a few lines of code like that, thanks for these demos!

ErosOlmi
10-09-2007, 07:20
I too get some Javascript error from time to time.
I've seen that also other programming languages using the same technique have the same problem.
At the moment I do not know how to solve it but I'm investigating.

Other experiment is to pass instead of a URL a MS Word or MS Excel file name (they must exists) and see.
Or just pass a directory path like: $OcxName = app_sourcepath

Well, now the target is to try to understand how to interact with the embedded object.

José Roca
10-09-2007, 20:06
Neat that so much can be done in a few lines of code like that.


It can still be shorter. Just remove AtlAxWinTerm. It is not needed because Windows will unregister the class automatically when the application ends.



Other experiment is to pass instead of a URL a MS Word or MS Excel file name (they must exists) and see.


ATL has not good support for documents. It certainly will load word and excel files, but you will find repainting problems and the like.

A better option is to use ATL to embed the webbrowser control and the webbrowser control to embed the document using the Navigate2 method.



Well, now the target is to try to understand how to interact with the embedded object.


It's easy if you use the webbrowser control as the container.

See my post in this thread: http://www.jose.it-berater.org/smfforum/index.php?topic=772.0

As you surely know, I have wrappers for the WebBrowser control and MSHTML.

ErosOlmi
10-09-2007, 20:30
Thank you Jose for your suggestions.

I'm only at the very beginning on this. The final idea is to have thinBasic to work using directly dot notation (object.method, orbject.property, ...) but this is only a dream at the moment. I've already used some of your wrappers, for example ODBC, MSXML and VB_RegExp, but adding a wrapper module for every object seems to be too much. I would like to make thinBasic able to work directly with (possibly) every component directly.

For all here having some issue about COM prgramming, please note that Josè is really a guru on this matter (and others of course). Many of the things I know on programming come from some studing of Josè sources.

Josè forum can be found at http://www.jose.it-berater.org/smfforum/
Search for the many wrappers/sources/samples and ... study, study, study!

:D

kryton9
10-09-2007, 22:58
THanks Eros, sounds like you will make it easy enough for even me to use!

Jose's site is a must visit for me every day, so much to read and study there it is wonderful, my new library!!