<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Handle auf Window^^]]></title><description><![CDATA[<p>Hi@all. Habe da mein Problem mit Handle mal zusammen gefasst. Habe eine normale Dialog-Anwendung erstellt und nen Button dazu mit folgendem Quelltext:</p>
<pre><code class="language-cpp">void CtestDlg::OnBnClickedButton1()
{
	CoInitialize(NULL);
	IGraphBuilder *pGraph;
	CoCreateInstance(CLSID_FilterGraph, NULL, 
    CLSCTX_INPROC_SERVER, IID_IGraphBuilder, (void **)&amp;pGraph);
	IMediaControl *pControl;
	IMediaEvent   *pEvent;
	IVideoWindow *pVidWin = NULL;
	pGraph-&gt;QueryInterface(IID_IVideoWindow, (void **)&amp;pVidWin);
	pGraph-&gt;QueryInterface(IID_IMediaControl, (void **)&amp;pControl);
	pGraph-&gt;QueryInterface(IID_IMediaEvent, (void **)&amp;pEvent);

	const char* WndClass=AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW);	//Fensterklasse für MovieWindow registrieren.
	CWnd *p=new CWnd;
	p-&gt;CreateEx(NULL,WndClass,&quot;CAMEDI&quot;,WS_POPUP|WS_TABSTOP|WS_CAPTION|WS_SYSMENU|WS_VISIBLE|WS_MINIMIZEBOX,250,50,700,450,NULL,NULL);	//MovieWindow erstellen (anzeigen).

	pVidWin-&gt;put_Owner((OAHWND)p-&gt;m_hWnd);
	pVidWin-&gt;put_WindowStyle(WS_CHILD | WS_CLIPSIBLINGS);
	RECT grc;
	::GetClientRect(p-&gt;m_hWnd, &amp;grc);
	pVidWin-&gt;SetWindowPosition(0, 0, grc.right, grc.bottom);
	pGraph-&gt;RenderFile(L&quot;C:\\test.avi&quot;, NULL);
	pControl-&gt;Run();
	long evCode = 0;
	pEvent-&gt;WaitForCompletion(INFINITE, &amp;evCode);
	pControl-&gt;Release();
	pEvent-&gt;Release();
	pGraph-&gt;Release();
	CoUninitialize();
}
</code></pre>
<p>Mein Problem ist, das m_hWnd der Handle auf den Dialog ist. Das Video wird aber nicht wirklich im Dialog angezeigt. Was mache ich falsch??</p>
<p>danke!!!<br />
grüße</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/143931/handle-auf-window</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Jul 2026 20:56:29 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/143931.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 12 Apr 2006 22:04:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Handle auf Window^^ on Wed, 12 Apr 2006 22:04:57 GMT]]></title><description><![CDATA[<p>Hi@all. Habe da mein Problem mit Handle mal zusammen gefasst. Habe eine normale Dialog-Anwendung erstellt und nen Button dazu mit folgendem Quelltext:</p>
<pre><code class="language-cpp">void CtestDlg::OnBnClickedButton1()
{
	CoInitialize(NULL);
	IGraphBuilder *pGraph;
	CoCreateInstance(CLSID_FilterGraph, NULL, 
    CLSCTX_INPROC_SERVER, IID_IGraphBuilder, (void **)&amp;pGraph);
	IMediaControl *pControl;
	IMediaEvent   *pEvent;
	IVideoWindow *pVidWin = NULL;
	pGraph-&gt;QueryInterface(IID_IVideoWindow, (void **)&amp;pVidWin);
	pGraph-&gt;QueryInterface(IID_IMediaControl, (void **)&amp;pControl);
	pGraph-&gt;QueryInterface(IID_IMediaEvent, (void **)&amp;pEvent);

	const char* WndClass=AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW);	//Fensterklasse für MovieWindow registrieren.
	CWnd *p=new CWnd;
	p-&gt;CreateEx(NULL,WndClass,&quot;CAMEDI&quot;,WS_POPUP|WS_TABSTOP|WS_CAPTION|WS_SYSMENU|WS_VISIBLE|WS_MINIMIZEBOX,250,50,700,450,NULL,NULL);	//MovieWindow erstellen (anzeigen).

	pVidWin-&gt;put_Owner((OAHWND)p-&gt;m_hWnd);
	pVidWin-&gt;put_WindowStyle(WS_CHILD | WS_CLIPSIBLINGS);
	RECT grc;
	::GetClientRect(p-&gt;m_hWnd, &amp;grc);
	pVidWin-&gt;SetWindowPosition(0, 0, grc.right, grc.bottom);
	pGraph-&gt;RenderFile(L&quot;C:\\test.avi&quot;, NULL);
	pControl-&gt;Run();
	long evCode = 0;
	pEvent-&gt;WaitForCompletion(INFINITE, &amp;evCode);
	pControl-&gt;Release();
	pEvent-&gt;Release();
	pGraph-&gt;Release();
	CoUninitialize();
}
</code></pre>
<p>Mein Problem ist, das m_hWnd der Handle auf den Dialog ist. Das Video wird aber nicht wirklich im Dialog angezeigt. Was mache ich falsch??</p>
<p>danke!!!<br />
grüße</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1036373</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1036373</guid><dc:creator><![CDATA[Herzdame]]></dc:creator><pubDate>Wed, 12 Apr 2006 22:04:57 GMT</pubDate></item><item><title><![CDATA[Reply to Handle auf Window^^ on Wed, 12 Apr 2006 22:20:03 GMT]]></title><description><![CDATA[<p>sorry hab mich vertan. habe hier ja schon das neue fenster erstellt. ändert aber nichts. im dialog und im neuen fenster wird nichts angezeigt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1036382</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1036382</guid><dc:creator><![CDATA[Herzdame]]></dc:creator><pubDate>Wed, 12 Apr 2006 22:20:03 GMT</pubDate></item></channel></rss>