<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>
<DIV>Hi, VTK users,</DIV>
<DIV> </DIV>
<DIV> I want to draw something directly to "vtkWindow", for
example, I want to draw a border around the "vtkWindow". So I code as
following:</DIV>
<DIV>==========================================================</DIV>
<DIV> CRect
oRect;<BR> GetClientRect(oRect);<BR> this->SetupMemoryRendering(
oRect.Width(),<BR> oRect.Height(),<BR> pDC->m_hAttribDC);</DIV>
<DIV> </DIV>
<DIV> vtkMFCRenderView::OnDraw(pDC);</DIV>
<DIV> </DIV>
<DIV> vtkWin32OpenGLRenderWindow *pRenderWindow =
(vtkWin32OpenGLRenderWindow*)this->GetVTKWindow();<BR> CDC *pMemoryDC =
CDC::FromHandle( pRenderWindow->GetMemoryDC() );<BR> CPen *pOldPen =
NULL;<BR> CPen oFramePen( PS_SOLID, 1, FOCUS_COLOR_3D );<BR> pOldPen =
pMemoryDC->SelectObject(&oFramePen);<BR> pMemoryDC->SelectStockObject(NULL_BRUSH);<BR> pMemoryDC->Rectangle(oRect);<BR> pMemoryDC->SelectObject(pOldPen);<BR> pDC->SetStretchBltMode(HALFTONE);<BR> pDC->StretchBlt(
0, 0, oRect.Width(), oRect.Height(), <BR>
CDC::FromHandle( pRenderWindow->GetMemoryDC()
),<BR> 0, 0, oRect.Width(), oRect.Height(),
SRCCOPY );</DIV>
<DIV><BR> this->ResumeScreenRendering();<BR>============================================================<BR>
The rendering result is no problem, but the rendering speed is decreased very
much.</DIV>
<DIV> Is there any other method to draw something into
"vtkWindow" directly without using vtk actors?</DIV>
<DIV> </DIV>
<DIV>Regards,</DIV>
<DIV>Denver</DIV></DIV></BODY></HTML>