<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>I am still locked with problems of handling interaction between MFC interface and vtkRenderWindow. <SPAN style="FONT-SIZE: 12pt"><FONT face=arial size=2>The main problem is that <STRONG><B>my render window is just a small part of my MFC window (CView</B></STRONG>). </FONT></SPAN></DIV>
<DIV> </DIV>
<DIV>To resume, I tried 2 possibilities:</DIV>
<DIV> </DIV>
<DIV>-1- </DIV>
<DIV><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"><SPAN style="FONT-WEIGHT: bold"><FONT face=arial size=2> myRenderWindow->SetParentId(this->m_hWnd);<BR> myRenderWindow->WindowInitialize();</FONT></SPAN></SPAN></FONT></DIV>
<DIV><SPAN style="FONT-SIZE: 12pt"><SPAN style="FONT-WEIGHT: bold"></SPAN></SPAN><SPAN style="FONT-SIZE: 12pt"><FONT face=arial><FONT size=2> <STRONG>CRect rect;</STRONG></FONT></FONT></SPAN><SPAN style="FONT-WEIGHT: bold"><BR><FONT face=arial> GetDlgItem(IDC_RECT)->GetWindowRect(rect);<BR> myRenderWindow->SetPosition(rect.left,rect.top);<BR> myRenderWindow->SetSize(rect.Width(),rect.Height());</FONT></SPAN></DIV>
<DIV><SPAN style="FONT-WEIGHT: bold"></SPAN> </DIV>
<DIV><SPAN style="FONT-WEIGHT: bold"></SPAN><SPAN style="FONT-SIZE: 12pt"><FONT size=2>But in this case, clicks in the MFC window are fine but clicks in the render window are not always correctly handled. </FONT></SPAN><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">I couldn't figure out why mouse clicks are only handled when happening outside the render window. </SPAN></FONT></DIV>
<DIV><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </DIV>
<DIV><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">-2- </SPAN></FONT></DIV>
<DIV><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<DIV><FONT face=arial size=3><STRONG></STRONG></FONT> </DIV>
<DIV><FONT face=arial size=2><STRONG>CWnd* pWnd = GetDlgItem(IDC_RECT);<BR></STRONG></FONT><FONT face=arial><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><FONT color=#000000><STRONG>myRenderWindow -></STRONG></FONT></SPAN><FONT size=2><STRONG>SetParentId(this->m_hWnd);<BR></STRONG><FONT color=#000000><STRONG><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">myRenderWindow -></SPAN>SetWindowId(pWnd->GetSafeHwnd());<BR><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">myRenderWindow -></SPAN>WindowInitialize();<BR> pWnd->ShowWindow(SW_SHOW);</STRONG></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=arial size=2>This seems better but now, I got problems while repainting that I didn't have with the 1st solution: my render window appears only when the CWnd associated to it, is visible</FONT></SPAN></FONT><SPAN style="FONT-SIZE: 12pt"><FONT face=arial><FONT size=2> with </FONT></FONT></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 12pt"><FONT face=arial><FONT size=2>ShowWindow(SW_SHOW)). But, by doing this, the MFC window itself is also visible and every paint called, <STRONG>I have to click on the render window that I can't see to make it appear</STRONG>. So strange! what I would like to have is <STRONG>a render window visible but not the rectangle that contains it. </STRONG></FONT></FONT></SPAN></DIV>
<DIV><FONT face=arial><SPAN style="FONT-SIZE: 12pt"><STRONG></STRONG></SPAN></FONT> </DIV>
<DIV><SPAN style="FONT-SIZE: 12pt"><FONT face=arial size=2>- So, none of these solutions works fine. I don't know <STRONG>what else to try</STRONG>. I checked out in the code and it seems that, to handle my paint problem, maybe, I could set the <STRONG>Device context</STRONG> to the same than my parent's with <STRONG>SetDisplayId</STRONG>. But I couldn't find examples that implement SetDisplayId(). <STRONG>What is the use of this function? Could it be the solution to my problem. </STRONG></FONT></SPAN></DIV>
<DIV><FONT face=arial><SPAN style="FONT-SIZE: 12pt"><STRONG></STRONG></SPAN></FONT> </DIV>
<DIV>Isabelle</DIV></DIV><p>
                <hr size=1>
<b><font color=#FF0000>Appel audio GRATUIT</font> partout dans le monde</b> avec le nouveau Yahoo! Messenger<br>
<a href="http://us.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.messenger.yahoo.com">Téléchargez le ici !</a>