Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ActiveForm and HTML parameters

5 views
Skip to first unread message

Mike Cobb

unread,
Dec 8, 1999, 3:00:00 AM12/8/99
to
Hi

I'm looking for some sample code for creating an ActiveForm that can read in
parameters from an HTML page. I've searched high and low, and spent lots of
money on various books but there seems to be little advice other than to
read through the MS notes on the topic which are frankly beyond me. Has
anyone cracked this yet who's prepared to share how they did it?

Regards Mike

Alex Bakaev [TeamB]

unread,
Dec 8, 1999, 3:00:00 AM12/8/99
to
Mike, I posted snippets of code on this NG that shows what should be
done in the ActiveX control so it can get parameters from HTML. Search
with www.deja.com for IPersistPropertyBag. Also, Begining ATL COM
Programming has some info on the subject.

HTH,
Alex

Mike Cobb wrote:
[snip]

Mike Cobb

unread,
Dec 9, 1999, 3:00:00 AM12/9/99
to
Hi

I'd seen your earlier post on this and found your snippets" which I got to
work fine with an ActiveX control - much appreciated. I'm probably missing
something but I couldn't see how this was transferred to an ActiveForm
control. There's no where obvious to me to add IPersistPropertyBag. When I
added the ActiveX button that was IPersistPropertyBag enabled to the
ActiveForm it didn't seem to be able to read in the HTML parameter either.
What I'm really looking to build is an ActiveForm that can read parameters.

Regards Mike


Alex Bakaev [TeamB]

unread,
Dec 9, 1999, 3:00:00 AM12/9/99
to
Mike, the following is a part of the ActiveForm implementation header:
class ATL_NO_VTABLE TActiveEFXImpl:
VCLCONTROL_IMPL( TActiveEFXImpl, ActiveEFX, TActiveEFX, IActiveEFX,
DIID_IActiveEFXEvents ),
public IPersistPropertyBagImpl<TActiveEFXImpl>
{
AnsiString FileName;

// The COM MAP entries declares the interfaces your object exposes
(through
// QueryInterface). CComRootObjectEx::InternalQueryInterface only
returns
// pointers for interfaces in the COM map. VCL controls exposed as OCXes
// have a minimum set of interfaces defined by the
// VCL_CONTROL_COM_INTERFACE_ENTRIES macro. Add other interfaces
supported
// by your object with additional COM_INTERFACE_ENTRY[_xxx] macros.
//
BEGIN_COM_MAP(TActiveEFXImpl)
VCL_CONTROL_COM_INTERFACE_ENTRIES( IActiveEFX )
COM_INTERFACE_ENTRY_IMPL( IPersistPropertyBag )
END_COM_MAP()

// The PROPERTY map stores property descriptions, property DISPIDs,
// property page CLSIDs and IDispatch IIDs. You may use use
// IPerPropertyBrowsingImpl, IPersistPropertyBagImpl,
IPersistStreamInitImpl,
// and ISpecifyPropertyPageImpl to utilize the information in you
property
// map.
//
// NOTE: The BCB Wizard does *NOT* maintain your PROPERTY_MAP table. You
must
// add or remove entries manually.
//
BEGIN_PROPERTY_MAP(TActiveEFXImpl)
// PROP_PAGE(CLSID_ActiveEFXPage)
PROP_ENTRY( "FileName", 15, CLSID_ActiveEFX)
END_PROPERTY_MAP()


Hope this explains where to put the IPersistPropertyBag

Mike Cobb

unread,
Dec 11, 1999, 3:00:00 AM12/11/99
to
Hi

Magic, that's just what I needed to get me started. Many thanks

Mike

Alex Bakaev [TeamB]

unread,
Dec 11, 1999, 3:00:00 AM12/11/99
to
You are welcome.

Alex

Mike Cobb

unread,
Dec 16, 1999, 3:00:00 AM12/16/99
to
Hi Alex

Where's your original post gone? I've just come back to copy your snippet
and it's not there. You couldn't resend it could you?

Many thanks. Sorry to be a pain.

Mike

Stefan Hoffmeister (TeamB)

unread,
Dec 16, 1999, 3:00:00 AM12/16/99
to
: "Mike Cobb" <mi...@cobweb.co.uk> wrote:

>Where's your original post gone?

To the archives. Please have a look at the site referenced below.

--
General information:
* Post to the right group - http://www.borland.com/newsgroups/
* Do not cross- or multipost
* Research at http://www.mers.com/searchsite.html

Stefan Hoffmeister - http://www.econos.de/
(TeamB - http://www.teamb.com/)

Alex Bakaev [TeamB]

unread,
Dec 16, 1999, 3:00:00 AM12/16/99
to
Mike, if the server hasn't expired the messages yet, you could instruct
your newsreader to show old articles.

HTH,
Alex

--
HotSend - portable documents technology
http://www.hotsend.com/
eFax - get your faxes via email - Free !
http://www.efax.com

0 new messages