1. RE: EUCOM problems
- Posted by Matthew Lewis <matthewwalkerlewis at YAHOO.COM> Aug 28, 2001
- 552 views
> -----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
2. RE: EUCOM problems
- Posted by Bernie Ryan <xotron at localnet.com> Aug 28, 2001
- 506 views
Matthew Lewis wrote: > 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 Matt: I downloaded the zip file from your Web Site and it does the same thing. I'am using ie5.5 using win95 and when I click on EuCOM.chm the the help file starts to load and then puts a message box on it that says "This program has performed an illegal operation and will shut down". comtest.exw works find. tbrowse.exw is missing the files print.e and tlbin32.ew so I can't run it. Why don't you try unzipping the zip file to a new directory and see what is missing and works. Remember that a user that downloads it will not have all the files that are sitting in your include directory. Bernie