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

GraphEdit Property Pages vs. Code

304 views
Skip to first unread message

Alessandro Angeli

unread,
Aug 15, 2002, 1:24:42 PM8/15/02
to
The pins' pages are added by GraphEdit, they're not supplied by the filter.


"Curt Peterson" <cu...@NsOtSrPiAkMeMfIoNrGcMeEsoftware.com> wrote in message
news:cCQ69.371$wj.1...@news.uswest.net...
> I've seen questions regarding this on Google Groups searches, but no
answers...
>
> How can I get _all_ the property pages to show up in my program - the same
> as GraphEdit - What is it that gets those extra pages?
>
> For example, in GraphEdit I get pages (for Video Renderer) of:
>
> Quality
> DirectDraw
> Performance
> Input
>
> That's Four.
>
> In my program I get:
>
> Quality
> DirectDraw
> Performance
>
> That's only THREE!?
>
> So. What is up?
>
> It appears that the page is related to the Pin, but how do I get it to
come up?
>
>

Alessandro Angeli

unread,
Aug 16, 2002, 5:43:54 AM8/16/02
to
GraphEdit is likely to do something like the following:

- invoke ISpecifyPropertyPages::GetPages() on the filter
- list the filter pins via IBaseFilter::EnumPins()
- get each pin's name from IPin::QueryPinInfo()
- get each pin's media type from IPin::ConnectionMediaType()
or, if the pin is not connected, its list of preferred
media types from IPin::EnumMediaTypes()
- create the property frame using either OleCreatePropertyFrame()
or creating it's own dialog
- display the filter's IPropertyPage's and it's own panels
for the pins

"Curt Peterson" <cu...@NsOtSrPiAkMeMfIoNrGcMeEsoftware.com> wrote in message

news:06_69.601$Tj3.3...@news.uswest.net...
> Where does GraphEdit get them and how do they get added to the other
pages?
>
>
> "Alessandro Angeli" <a.angel...@sogetel.REMOVE.it> wrote in message
> news:euC$6IIRCHA.1996@tkmsftngp12...

Alessandro Angeli

unread,
Aug 16, 2002, 1:06:38 PM8/16/02
to
I have no experience with OleCreatePropertyFrame(), however you could try to
create and register your own implementation of the IPropertyPage for the
pin, then pass to OleCreatePropertyFrame() an array containing the GUIDs of
the filter pages you want to display and the GUID of your pin page, one for
each pin. Pass also the pin pointers in the objects' array so that your
pages will receive those pointers (you can distinguish them querying for
IPin) and you can then display the relevant informations. Can't guarantee
that works.

"Curt Peterson" <cu...@NsOtSrPiAkMeMfIoNrGcMeEsoftware.com> wrote in message

news:nh779.986$wj.3...@news.uswest.net...


>
> "Alessandro Angeli" <a.angel...@sogetel.REMOVE.it> wrote in message

> news:#PPE3wQRCHA.2556@tkmsftngp09...


> > GraphEdit is likely to do something like the following:
> >

> > > - create the property frame using either OleCreatePropertyFrame()
> > or creating it's own dialog
> > - display the filter's IPropertyPage's and it's own panels
> > for the pins
> >
>

> Thanks for your response! One last question. Is there a way to add a panel
to the Property Pages
> referenced in OleCreatePropertyFrame()? Or, if that won't work, is there a
way to extract the dialog
> information from the CAUUID object? I was suspecting the first method,
since the additional pages
> seem to be simple Text - based "reports" rather than dialog controls.
>
> I could make my own second dialog, or whatever, but it seems that
GraphEdit's method is cleaner.
> I have spent quite a bit of time trying to do some of the things GraphEdit
can do, and have been
> roadblocked on a number of occasions.
>
> Thanks Again,
>
> Curt
>
>
>

Alessandro Angeli

unread,
Aug 19, 2002, 9:55:57 AM8/19/02
to
> I don't mind creating a property page for my own COM objects, but since
> GraphEdit doesn't need it, I shouldn't either.
>
> Does anyone out there have an intimate knowledge of OleCreatePropertyFrame
> or the methods GraphEdit might use to do this? Being fairly new to COM and

Why do you say GE doesn't need it? There are only 3 ways Windows provides so
that an application can perform such a task, and GE must use one of those
since it's just a windowed application.

1. you create your own frame to host the filter's property pages and other
informations about the pins
2. you use OleCreatePropertyFrame() to host the filter's pages, but to add
other informations you need to disguise them as other IPropertyPage's
3. you use OleCreatePropertyFrame() and hack into the created frame's HWND
hierarchy to add other components to display the pins' informations

I should add that GE doesn't import OleCreatePropertyFrame() or
OleCreatePropertyFrameIndirect(), so it's likely it uses the first way.


Alessandro Angeli

unread,
Aug 19, 2002, 2:09:42 PM8/19/02
to
What I think GraphEdit does is not use OleCreatePropertyFrame() at all but
it creates its very own frame, so that it does not need to either "hack" the
frame or fake property pages for the pins.

Hosting an IPropertyPage is IMHO easier than creating a page.

1. create the window/dialog/component to host the pages
2. create an IPropertyPageSite to wrap the window
3. query the filter for its pages' GUIDs with
ISpecifyPropertyPages::GetPages()
4. then CoCreateInstance() each page you want to display
5. initialize each page passing an instance of your IPropertyPageSite to
IPropertyPage::SetPageSite() and a pointer to the IBaseFilter in
SetObjects().
6. Activate() it with the HWND of its container
7. Show() it
8. ...

You can read a description of how the OLE frame implementation works in the
PSDK:

\Platform SDK Documentation
\Component Services
\COM
\Control and Property Pages
\Guide
\Property Pages and Property Sheets
\Property Sheets and Property Pages
\Reference
\Interfaces
\IPropertyPage
\IPropertyPageSite
\IPropertyPageSite - Ole Implementation

"Curt Peterson" <cu...@NsOtSrPiAkMeMfIoNrGcMeEsoftware.com> wrote in message

news:5A989.2751$Tj3.1...@news.uswest.net...
> Alessandro,
>
> You have been very helpful and responsive. I appreciate that.
>
> I am still looking for a "codeable" method to perform this function, that
is,
> I want to know what library calls to make. There is not enough
documentation
> in MSDN to do what I am trying...
>
> I would like to write code that is not considered "hacking." If hacking is
> what was done by the authors of GraphEdit, I understand. And I will
> make my GUI different instead. - like putting up a "hint" or something...
>
> Kludge makes me sick. It looks like something is happening that really
_isn't_
> truly happening (like showing a property page that is NOT a property
page)...


>
> >
> > 1. you create your own frame to host the filter's property pages and
other
> > informations about the pins
>

> Is there some documented "PropertyFrame" object that I can work with?
> I find _nothing_ in the documentation.
>
>
>

0 new messages