RE: EUCOM problems

new topic     » topic index » view thread      » older message » newer message

> -----Original Message-----
> From: Bernie Ryan [mailto:xotron at localnet.com]

> Matt:
>    EUCOM.CHM crashes when I try to open it.
>    TLBINF32.EW is missing from zip file.
>    
>    Are there any files missing that explain howto interface
>    the code any OCX ? 
> Bernie

What version of IE do you have?  EuCOM.chm has worked fine with 5/5.5 for me. 
The version on my page has it:

http://www14.brinkster.com/matthewlewis/projects.html

You should be able to hook up with any ActiveX object.  First, register the
CLSID using add_clsid.  Then add the IID for IDispatch (since that's how you'll
probably need to communicate with the object).  Create the object, and you're
good to go.  I'll try to put the chm docs into straight html in the next few
days.

Here is the documentation I wrote for ActiveX objects:

ActiveX controls are really just COM objects, although they can be a little
more complex to use, since there are requirements for container apps that don't
come along with plain old COM objects (VB does this for you, and C++ has libs
that do most of the work, too). Lucky for you, I've taken care of most of the
ugly details of implementing interfaces, etc.

The demo provided (comtest.exw) uses ActiveX.ew to run sgrid.ocx, which is a
freeware ActiveX control I found. sgrid.ocx is a nice control that gives you a
spreadsheet like grid, including simple formula support.

The demo is very simple. It really doesn't do anything with the grid, other
than resize it as you resize the window. Take a look at either the help file or
sgrid.ew for the list of commands that you can use.

Comtext.exw will automatically register sgrid.ocx for you. If you later want to
unregister sgrid, the following piece of code will do it for you:

-- begin unregistration code

constant
sgrid_ocx = open_dll( "sgrid.ocx" ),
unreg = define_c_proc( sgrid_ocx, "DllUnregisterServer", {} ),
ok = c_proc( unreg, {} )

-- end unregistration code

Using ActiveX Events:
You'll need to implement the control's outgoing interface. See sgrid.ew for an
example. The routines will most likely be called through IDispatch::Invoke, if
IDispatch is part of the interface.

Once you have all the functions in a vtbl, you'll need to call add_ax_events()
to let the control know about your interface. This should all be done when the
control is initialized.

You then create Euphoria routines in your main program to handle the routines.
These work similar to events in Win32Lib. Your event handlers should have the
same parameters as the interface routines, however, any strings will be
converted to sequences from pointers. The first parameter will always be the id
returned when you created the control (as opposed to the 'this' pointer which
is actually received by the interface). 

TBrowse will wrap virtually everything you'll need to do with ActiveX controls
except to implement event sink interfaces. You'll still have to do that
yourself. If I figure it out, maybe it will do this as well, someday. 



=====
Matt Lewis
http://www14.brinkster.com/matthewlewis

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu