🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.pascal.delphi.misc
2 messages
2 total messages Started by dalalchirag Fri, 12 Jun 1998 00:00
TBitmap in ActiveX
#131
Author: dalalchirag
Date: Fri, 12 Jun 1998 00:00
17 lines
1203 bytes
Hi,

I got one of my components working as ActiveX component... except for one
thing. The Delphi component uses TBitmap property. How do I map this property
into an ActiveX component? The default one-click-ActiveX generated code
neither includes TBitmap property not TStrings property. Is it because the
way other ActiveX containers might handle bitmaps differently ?

Any help will be appreciated.

Thanks in advance.

- Chirag Dalal

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading
Re: TBitmap in ActiveX
#132
Author: R. Annand
Date: Sat, 13 Jun 1998 00:00
39 lines
2605 bytes
In article <6lrp65$v82$1@nnrp1.dejanews.com>, dalalchirag@my-dejanews.com wrote:
>Hi,

>I got one of my components working as ActiveX component... except for one
>thing. The Delphi component uses TBitmap property. How do I map this property
>into an ActiveX component? The default one-click-ActiveX generated code
>neither includes TBitmap property not TStrings property. Is it because the
>way other ActiveX containers might handle bitmaps differently ?

Was just playing around with the ActiveX stuff today, and it essentially seems 
that for any properties that represent Delphi classes, those classes have to 
have an automation type built for them.  The outside OLE world cannot talk 
directly to a TBitmap or a TStrings, because those are simply not valid OLE 
types.

It's not too too bad, though - the two-project example in the 
Demos\Oleauto\Autoserv directory under Delphi seems to illustrate an easy-ish 
way to do this sort of thing.  It's got the IMemoApp interface, which 
represents the interface to the whole MemoEdit application, but it adds an 
interface into the individual memos (which have an IMemoDoc interface 
implemented for them - you'd have to do something similar for the bitmap or 
strings object,s, unless that sort of work has already been done somewhere in 
Delphi for some of the object types) - it gives a property for the MemoCount, 
and an array property called Memos[] which is of type OleVariant, and the 
Get_Memos returns an IMemoDoc for the memo in question.

Takes a little bit of study, but it shouldn't be too hard to come up with a 
minimalist interface to it (a LoadFromFile for the bitmap would be easy, but 
it might be considerably more difficult to try assigning an actual bitmap 
straight across :)

*smile* I'm a neophyte in the area myself, though - but I was terribly pleased 
to be able to make another small project that can order my big project about 
:)

Hope that helps..

  --=- Ritchie Annand
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads