[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vtkusers
Subject:    RE: [vtkusers] Moving a renderwindow to a new parent
From:       "John Platt" <jcplatt () dsl ! pipex ! com>
Date:       2006-11-28 23:18:08
Message-ID: 000e01c71343$7b194a20$0100a8c0 () pacsys4
[Download RAW message or body]

Hi Beau,

 

I seem to recall that SetParentID() eventually causes VTK to create a
new OpenGL window and install it's own WindowProc() so it can handle
mouse and keyboard events directly (not through the View). Have you
tried Windows ::SetParent() on the VTK window? You may also need
additional code in OnDestroy() of your CView derived class to prevent it
deleting the child VTK window .

 

HTH

 

John.

 

-----Original Message-----
From: vtkusers-bounces+jcplatt=dsl.pipex.com@vtk.org
[mailto:vtkusers-bounces+jcplatt=dsl.pipex.com@vtk.org] On Behalf Of
Beau Sapach
Sent: 28 November 2006 16:53
To: 'vtkusers'
Subject: [vtkusers] Moving a renderwindow to a new parent

 

Hello everyone,

 

Currently I attach vtkRenderWindows to MFC windows by passing the MFC
window's m_hWnd member to SetParentID.  I think this is the right way to
do it, but correct me if I'm wrong.  Now if I wish to "detach" a render
window, so to speak from its parent and say "move" it to another parent
window then what is the proper way of doing it?  I've tried calling
SetParentID(NULL) but that hasn't worked, the render window appears to
still be attached to its previous parent.  And the application breaks in
an MFC DLL when I try to delete the previous parent.

 

 

Beau

 


[Attachment #3 (text/html)]

<html xmlns:m="http://schemas.microsoft.com/office/2004/12/omml">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">


<meta name=Generator content="Microsoft Word 10 (filtered)">

<style>
<!--a:link
	{mso-style-priority:99;}
span.MSOHYPERLINK
	{mso-style-priority:99;}
a:visited
	{mso-style-priority:99;}
span.MSOHYPERLINKFOLLOWED
	{mso-style-priority:99;}

 /* Font Definitions */
 @font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
	{font-family:Calibri;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:Calibri;}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
span.E-mailSignatureChar
	{font-family:"Times New Roman";}
span.EmailStyle19
	{font-family:Calibri;
	color:windowtext;}
span.EmailStyle20
	{font-family:Arial;
	color:navy;}
@page Section1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Hi Beau,</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I seem to recall that SetParentID() eventually
causes VTK to create a new OpenGL window and install it's own WindowProc() so
it can handle mouse and keyboard events directly (not through the View). Have you
tried Windows ::SetParent() on the VTK window? You may also need additional
code in OnDestroy() of your CView derived class to prevent it deleting the child
VTK window .</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>HTH</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>John.</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'>-----Original Message-----<br>
<b><span style='font-weight:bold'>From:</span></b>
vtkusers-bounces+jcplatt=dsl.pipex.com@vtk.org
[mailto:vtkusers-bounces+jcplatt=dsl.pipex.com@vtk.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Beau Sapach<br>
<b><span style='font-weight:bold'>Sent:</span></b> </span></font><font size=2 \
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>28 November  \
2006</span></font><font size=2 face=Tahoma><span style='font-size:10.0pt; \
font-family:Tahoma'> </span></font><font size=2 face=Tahoma><span  \
style='font-size:10.0pt;font-family:Tahoma'>16:53</span></font><font size=2 \
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'><br> <b><span \
style='font-weight:bold'>To:</span></b> 'vtkusers'<br> <b><span \
style='font-weight:bold'>Subject:</span></b> [vtkusers] Moving a renderwindow to a \
new parent</span></font></p>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 face=Calibri><span
style='font-size:11.0pt'>&nbsp;</span></font></p>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 face=Calibri><span
style='font-size:11.0pt'>Hello everyone,</span></font></p>

<p class=MsoAutoSig style='margin-left:36.0pt'><font size=3 face=Calibri><span
style='font-size:12.0pt;font-family:Calibri'>&nbsp;</span></font></p>

<p class=MsoAutoSig style='margin-left:36.0pt'><font size=3 face=Calibri><span
style='font-size:12.0pt;font-family:Calibri'>Currently I attach
vtkRenderWindows to MFC windows by passing the MFC window&#8217;s m_hWnd member
to SetParentID.&nbsp; I think this is the right way to do it, but correct me if
I&#8217;m wrong.&nbsp; Now if I wish to &#8220;detach&#8221; a render window,
so to speak from its parent and say &#8220;move&#8221; it to another parent
window then what is the proper way of doing it?&nbsp; I&#8217;ve tried calling
SetParentID(NULL) but that hasn&#8217;t worked, the render window appears to
still be attached to its previous parent.&nbsp; And the application breaks in
an MFC DLL when I try to delete the previous parent.</span></font></p>

<p class=MsoAutoSig style='margin-left:36.0pt'><font size=3 face=Calibri><span
style='font-size:12.0pt;font-family:Calibri'>&nbsp;</span></font></p>

<p class=MsoAutoSig style='margin-left:36.0pt'><font size=3 face=Calibri><span
style='font-size:12.0pt;font-family:Calibri'>&nbsp;</span></font></p>

<p class=MsoAutoSig style='margin-left:36.0pt'><font size=3 face=Calibri><span
style='font-size:12.0pt;font-family:Calibri'>Beau</span></font></p>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 face=Calibri><span
style='font-size:11.0pt'>&nbsp;</span></font></p>

</div>

</body>

</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic