| View previous topic :: View next topic |
| Author |
Message |
Sam S. Firouz Guest
|
Posted: Tue Mar 08, 2005 4:16 pm Post subject: DeskBand App |
|
|
I have been reading about Desk Band application for the past week and I am
lost. According to Microsoft (I quote) "In addition to IUnknown and
IClassFactory, all band objects must implement the following interfaces.
a.. IDeskBand
b.. IObjectWithSite
c.. IPersistStream"
How do I create a desk band in C++ Builder? Maybe my understanding of
interfaces is wrong. Could someone PLEASE help me?
Thank you,
Sam
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Tue Mar 08, 2005 5:52 pm Post subject: Re: DeskBand App |
|
|
"Sam S. Firouz" <sfirouz (AT) Hotmail (DOT) com> wrote
| Quote: | How do I create a desk band in C++ Builder?
|
What EXACTLY are you having a problem with? What does your existing code
look like, and what are you having a problem doing with it? You need to
provide specific details.
Gambit
|
|
| Back to top |
|
 |
Sam S. Firouz Guest
|
Posted: Tue Mar 08, 2005 7:11 pm Post subject: Re: DeskBand App |
|
|
I don't have any code yet. I don't know where to start.
I know how to create a ActiveX Library. I also know how to create a COM
object. But how do I make my object implement other interfaces? (IE,
IDeskBand, IObjectWithSite, IPersistStream) I thought my object should drive
from these classes in orther to expose thire functionality. But where do I
get them from?
Sam
"Remy Lebeau (TeamB)" <no.spam (AT) no (DOT) spam.com> wrote
| Quote: |
"Sam S. Firouz" <sfirouz (AT) Hotmail (DOT) com> wrote in message
news:422dd267$3 (AT) newsgroups (DOT) borland.com...
How do I create a desk band in C++ Builder?
What EXACTLY are you having a problem with? What does your existing code
look like, and what are you having a problem doing with it? You need to
provide specific details.
Gambit
|
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Tue Mar 08, 2005 7:36 pm Post subject: Re: DeskBand App |
|
|
"Sam S. Firouz" <sfirouz (AT) Hotmail (DOT) com> wrote
| Quote: | I don't have any code yet. I don't know where to start.
I know how to create a ActiveX Library. I also know how
to create a COM object.
|
Then it sounds like you already know where to start.
| Quote: | But how do I make my object implement other interfaces?
|
Simply add those interfaces to your Impl class's ancestor list, and then
implement the interface's methods directly in the Impl class. Also make
sure the interfaces appear in the Impl class's COM_MAP.
| Quote: | I thought my object should drive from these classes in orther to
expose thire functionality.
|
That is exactly what you do.
Gambit
|
|
| Back to top |
|
 |
Sam S. Firouz Guest
|
Posted: Tue Mar 08, 2005 7:51 pm Post subject: Re: DeskBand App |
|
|
| Quote: | Simply add those interfaces to your Impl class's ancestor list, and then
implement the interface's methods directly in the Impl class. Also make
sure the interfaces appear in the Impl class's COM_MAP.
|
How do I do that? Inside which DLL/OCX do they reside?
Thank you,
Sam
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Tue Mar 08, 2005 8:32 pm Post subject: Re: DeskBand App |
|
|
"Sam S. Firouz" <sfirouz (AT) Hotmail (DOT) com> wrote
Edit the Impl class's .h and .cpp files directly.
| Quote: | Inside which DLL/OCX do they reside?
|
You don't need that. Just add the appropriate header file(s) to your Impl
class's header file, then add the interfaces to your Impl class's ancestor
list, add the interfaces to the Impl class's COM_MAP, and then add the
method declarations. Then in the Impl class's .cpp file, write the
implementation code for the methods.
Gambit
|
|
| Back to top |
|
 |
Sam S. Firouz Guest
|
Posted: Tue Mar 08, 2005 8:43 pm Post subject: Re: DeskBand App |
|
|
| Quote: | Inside which DLL/OCX do they reside?
You don't need that. Just add the appropriate header file(s) to your Impl
class's header file, then add the interfaces to your Impl class's ancestor
list, add the interfaces to the Impl class's COM_MAP, and then add the
method declarations. Then in the Impl class's .cpp file, write the
implementation code for the methods.
|
But I don't have the header files for IDeskBand, ... I have to import them
from somewhere. I am assuming from another type library.
Thank you,
Sam
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Tue Mar 08, 2005 9:09 pm Post subject: Re: DeskBand App |
|
|
"Sam S. Firouz" <sfirouz (AT) Hotmail (DOT) com> wrote
| Quote: | But I don't have the header files for IDeskBand
|
Yes, you do. It is defined in shlobj.h in BCB3-5, and in shobjidl.h in
BCB6.
| Quote: | I have to import them from somewhere.
|
No, you do not.
Gambit
|
|
| Back to top |
|
 |
Sam S. Firouz Guest
|
Posted: Tue Mar 08, 2005 10:46 pm Post subject: Re: DeskBand App |
|
|
Thanks
Sam
"Remy Lebeau (TeamB)" <no.spam (AT) no (DOT) spam.com> wrote
| Quote: |
"Sam S. Firouz" <sfirouz (AT) Hotmail (DOT) com> wrote in message
news:422e0d0c$1 (AT) newsgroups (DOT) borland.com...
But I don't have the header files for IDeskBand
Yes, you do. It is defined in shlobj.h in BCB3-5, and in shobjidl.h in
BCB6.
I have to import them from somewhere.
No, you do not.
Gambit
|
|
|
| Back to top |
|
 |
|