Discussion:
How to get IVideoWindow's HWND?
(too old to reply)
Augie at NHN
2005-04-13 02:39:01 UTC
Permalink
I want to create a button in the middle of the video screen.
To put the button, I need to get the HWND of Video Renderer window because
the button needs parent window's handle.
I checked methods in IVideoWindow but I cannot see any method to get the
HWND value.
Is there any way to get the HWND?
And, can I create a button on the video window if I get the window handle?
The March Hare [MVP]
2005-04-13 04:20:08 UTC
Permalink
Post by Augie at NHN
I want to create a button in the middle of the video screen.
To put the button, I need to get the HWND of Video Renderer window because
the button needs parent window's handle.
I checked methods in IVideoWindow but I cannot see any method to get the
HWND value.
Is there any way to get the HWND?
And, can I create a button on the video window if I get the window handle?
Why not create the video window a window that you make yourself and set
using IVideoWindow::put_Owner? Then you have more control over it and have
its HWND.
--
Please read this before replying:
1. Dshow & posting help: http://tmhare.mvps.org/help.htm
2. Trim & respond inline (please don't top post or snip everything)
3. Benefit others: follow up if you are helped or you found a solution
Augie at NHN
2005-04-13 06:06:02 UTC
Permalink
Post by The March Hare [MVP]
Post by Augie at NHN
I want to create a button in the middle of the video screen.
To put the button, I need to get the HWND of Video Renderer window because
the button needs parent window's handle.
I checked methods in IVideoWindow but I cannot see any method to get the
HWND value.
Is there any way to get the HWND?
And, can I create a button on the video window if I get the window handle?
Why not create the video window a window that you make yourself and set
using IVideoWindow::put_Owner? Then you have more control over it and have
its HWND.
I tested put_Owner.
But the renderer has it's own window named "ActiveMovie Window".
So, I put the z-order of my control to the top so that the control may be
appeared in front of the "ActiveMovie Window" and it looked okay.. but
sometimes the control hides behind of the renderer.
Post by The March Hare [MVP]
--
1. Dshow & posting help: http://tmhare.mvps.org/help.htm
2. Trim & respond inline (please don't top post or snip everything)
3. Benefit others: follow up if you are helped or you found a solution
The March Hare [MVP]
2005-04-13 13:51:48 UTC
Permalink
Post by Augie at NHN
I tested put_Owner.
But the renderer has it's own window named "ActiveMovie Window".
So, I put the z-order of my control to the top so that the control may be
appeared in front of the "ActiveMovie Window" and it looked okay.. but
sometimes the control hides behind of the renderer.
The purpose of put_Owner is so that you can set the owner window of the
video and not have it appear in the ActiveMovie window. Look how the
samples use it. That way you can have more control of it.
--
Please read this before replying:
1. Dshow & posting help: http://tmhare.mvps.org/help.htm
2. Trim & respond inline (please don't top post or snip everything)
3. Benefit others: follow up if you are helped or you found a solution
Augie at NHN
2005-04-14 01:49:02 UTC
Permalink
Post by The March Hare [MVP]
Post by Augie at NHN
I tested put_Owner.
But the renderer has it's own window named "ActiveMovie Window".
So, I put the z-order of my control to the top so that the control may be
appeared in front of the "ActiveMovie Window" and it looked okay.. but
sometimes the control hides behind of the renderer.
The purpose of put_Owner is so that you can set the owner window of the
video and not have it appear in the ActiveMovie window. Look how the
samples use it. That way you can have more control of it.
I don't understand what exactly put_Owner does.

MSDN describes put_Owner as below,

IVideoWindow::put_Owner
The put_Owner method specifies a parent window for the video window.

Isn't it mean put_Owner specifies a parent window of "ActiveMovie Window"?
Actually the name "ActiveMovie Window" is not shown up on the video window
but I can get the name by using of Spy++.

As I know, to render video imgaes without ActiveMovie Window,
Windowless mode in VMR7 or VMR9 is needed.
But I don't want to use the VMR because it is avaliable only on Windows XP.

If you know the way to set the owner window of the video and not have it
appear in the ActiveMovie window, could you show me a sample?

Thank you.
Post by The March Hare [MVP]
--
1. Dshow & posting help: http://tmhare.mvps.org/help.htm
2. Trim & respond inline (please don't top post or snip everything)
3. Benefit others: follow up if you are helped or you found a solution
The March Hare [MVP]
2005-04-14 01:58:04 UTC
Permalink
Post by Augie at NHN
As I know, to render video imgaes without ActiveMovie Window,
Windowless mode in VMR7 or VMR9 is needed.
But I don't want to use the VMR because it is avaliable only on Windows XP.
VMR9 is available pre-XP but requires DX9 and a decent graphics card.
Post by Augie at NHN
If you know the way to set the owner window of the video and not have it
appear in the ActiveMovie window, could you show me a sample?
As I wrote earlier, look at the SDK samples and how they use put_Owner.
You can search for it using a plain Windows search or with Visual Studio.
--
Please read this before replying:
1. Dshow & posting help: http://tmhare.mvps.org/help.htm
2. Trim & respond inline (please don't top post or snip everything)
3. Benefit others: follow up if you are helped or you found a solution
Augie at NHN
2005-04-14 04:52:01 UTC
Permalink
Post by The March Hare [MVP]
Post by Augie at NHN
As I know, to render video imgaes without ActiveMovie Window,
Windowless mode in VMR7 or VMR9 is needed.
But I don't want to use the VMR because it is avaliable only on Windows XP.
VMR9 is available pre-XP but requires DX9 and a decent graphics card.
Post by Augie at NHN
If you know the way to set the owner window of the video and not have it
appear in the ActiveMovie window, could you show me a sample?
As I wrote earlier, look at the SDK samples and how they use put_Owner.
You can search for it using a plain Windows search or with Visual Studio.
I've checked several DXSDK samples using put_Owner but I cannot find any
sample that is not creating an ActiveMovie Window.
I think what you mean is not a WS_CHILD style window, right?
When I checked all samples with spy++, all of them were using ActiveMovie
Window.
Post by The March Hare [MVP]
--
1. Dshow & posting help: http://tmhare.mvps.org/help.htm
2. Trim & respond inline (please don't top post or snip everything)
3. Benefit others: follow up if you are helped or you found a solution
alan Renforth
2005-04-14 08:53:05 UTC
Permalink
Post by Augie at NHN
Post by The March Hare [MVP]
Post by Augie at NHN
As I know, to render video imgaes without ActiveMovie Window,
Windowless mode in VMR7 or VMR9 is needed.
But I don't want to use the VMR because it is avaliable only on Windows XP.
VMR9 is available pre-XP but requires DX9 and a decent graphics card.
Post by Augie at NHN
If you know the way to set the owner window of the video and not have it
appear in the ActiveMovie window, could you show me a sample?
As I wrote earlier, look at the SDK samples and how they use put_Owner.
You can search for it using a plain Windows search or with Visual Studio.
I've checked several DXSDK samples using put_Owner but I cannot find any
sample that is not creating an ActiveMovie Window.
I think what you mean is not a WS_CHILD style window, right?
When I checked all samples with spy++, all of them were using ActiveMovie
Window.
Try the StillCap sample
Post by Augie at NHN
Post by The March Hare [MVP]
--
1. Dshow & posting help: http://tmhare.mvps.org/help.htm
2. Trim & respond inline (please don't top post or snip everything)
3. Benefit others: follow up if you are helped or you found a solution
Augie at NHN
2005-04-15 00:59:01 UTC
Permalink
Post by alan Renforth
Try the StillCap sample
I'm using DirectX 9.0 SDK and cannot find the sample named "StillCap".
I tested "StillView", "AMCap" and "PlayCap" and all of them have the
"ActiveMovie Window"s.
alan Renforth
2005-04-15 09:14:48 UTC
Permalink
Post by Augie at NHN
Post by alan Renforth
Try the StillCap sample
I'm using DirectX 9.0 SDK and cannot find the sample named "StillCap".
I tested "StillView", "AMCap" and "PlayCap" and all of them have the
"ActiveMovie Window"s.
A quick check shows that "AMCap" and "PlayCap" both use "put_Owner()" to
set up the window. I suggest searching for "put_Owner" in one of these
projects!!!.
Augie at NHN
2005-04-15 17:13:04 UTC
Permalink
Post by alan Renforth
Post by Augie at NHN
Post by alan Renforth
Try the StillCap sample
I'm using DirectX 9.0 SDK and cannot find the sample named "StillCap".
I tested "StillView", "AMCap" and "PlayCap" and all of them have the
"ActiveMovie Window"s.
A quick check shows that "AMCap" and "PlayCap" both use "put_Owner()" to
set up the window. I suggest searching for "put_Owner" in one of these
projects!!!.
There are many samples using "put_Owner". But what I want to know is how
"put_Owner" make the video renderer use user specified window handle instead
of the "ActiveMovie Window".
All samples using "put_Owner" method that I found were just assigning the
"ActiveMovie window"'s parent window. So what I am thinking is the method
"put_Owner" just assigns the parent window of the "ActiveMovie Window" not
redirect the renderer window it self.
Actually what I wanted was just like windowless mode inVMR.
enze
2005-04-15 12:22:01 UTC
Permalink
Hi,
to get the video window handle do this:

- get the VideoRender input pin and querry for IOverlay interface
pInPin->QueryInterface(IID_IOverlay,(void**)&pOver);
-then use
pOver->GetWindowHandle(&m_hWnd);

enze, www.mpegcode.com
Post by Augie at NHN
I want to create a button in the middle of the video screen.
To put the button, I need to get the HWND of Video Renderer window because
the button needs parent window's handle.
I checked methods in IVideoWindow but I cannot see any method to get the
HWND value.
Is there any way to get the HWND?
And, can I create a button on the video window if I get the window handle?
Augie at NHN
2005-04-18 01:36:01 UTC
Permalink
Post by enze
Hi,
- get the VideoRender input pin and querry for IOverlay interface
pInPin->QueryInterface(IID_IOverlay,(void**)&pOver);
-then use
pOver->GetWindowHandle(&m_hWnd);
enze, www.mpegcode.com
Thank you. It's very useful. I'am using it now.
newsguy
2005-05-14 05:00:59 UTC
Permalink
use findwindowex and the window name "Video renderer", combined with
put_owner.

if you get stuck use the spy tool.
Post by Augie at NHN
I want to create a button in the middle of the video screen.
To put the button, I need to get the HWND of Video Renderer window because
the button needs parent window's handle.
I checked methods in IVideoWindow but I cannot see any method to get the
HWND value.
Is there any way to get the HWND?
And, can I create a button on the video window if I get the window handle?
soorya
2005-06-26 19:10:02 UTC
Permalink
hi,
can u or some one help me to over any graphics (bitmap or text)
on live video in VB6 ?

and can u pls. suggest me to avoid black frames on every new video file
rendering
with Mediaplayer OCX 6.4 ?

pls. help me...

regards
soorya
Post by Augie at NHN
I want to create a button in the middle of the video screen.
To put the button, I need to get the HWND of Video Renderer window because
the button needs parent window's handle.
I checked methods in IVideoWindow but I cannot see any method to get the
HWND value.
Is there any way to get the HWND?
And, can I create a button on the video window if I get the window handle?
Loading...