Re: adding propery pages to property sheet of app
See ISpecifyPropertyPages, IPropertyPage[2] and the API
to create the sheet is OleCreatePropertyFrame[Indirect].
You can have your plugins implement ISpecifyPropertyPages
and return their property page CLSIDs from there. Then
you create those property pages asking for IPropertyPage[2]
and give these to OleCreatePropertyFrame[Indirect]. Finally,
you also give OleCreatePropertyFrame[Indirect] the list of
plugin IUnkown pointers so the property pages can communicate
with the source objects. How the pages communicate with the
plugins is up to them - typicaly using hidden interfaces implemented
on the plugin objects. This mechanism is invented for ActiveX
Controls, but you can use it for your plugins just as well. Note
you can have a single page service multiple plugins and a single
plugin represented via multiple pages - this is completely
transparent to your host and is handled by the pages and their
corresponding plugins.
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://vcfaq.mvps.org
=====================================
"Sue" <jean.shu@gmail.com> wrote in message
news:1182363671.076000.278070@x35g2000prf.googlegroups.com...
Hi,
I have a mfc application. I also have some ATL com component( in proc
server) as the applications plugins. My application need to show
properties of the plugins. I'm thinking of having the main application
construct property sheet and let plugin contruct its page and add to
the property sheet, then the application can display it. Can anyone
tell me how to do this? Or am I on the right track? Any idea is
welcome. Thanks.
Sue