AW: [vtkusers] Rgdg GetMemoryDC method
de Boer Ingo
I.deBoer at polytec.de
Fri Aug 1 05:22:43 EDT 2003
> drawing operations on HDC that's returned by GetMemoryDC() method of
You can use something like
STDMETHODIMP CVTKViewer::ViewDrawDC(/*[in]*/ OLE_HANDLE hDC)
/*****************************************************************
* Copies the scene to a DC
*****************************************************************/
{
ObjectLock cLock(this);
HDC hWndDC = (HDC)hDC;
int* size = m_pvtkWin32OpenGLRW->GetSize();
m_pvtkWin32OpenGLRW->SetupMemoryRendering(size[0], size[1], hWndDC);
m_pvtkWin32OpenGLRW->Render();
HDC memDC = m_pvtkWin32OpenGLRW->GetMemoryDC();
::BitBlt(hWndDC, 0, 0, size[0], size[1], memDC, 0, 0, SRCCOPY);
m_pvtkWin32OpenGLRW->ResumeScreenRendering();
return S_OK;
}
also, take a look at the MFC-Samples of VTK. There is a function for
copying data to the clipboard.
greets
Ingo
More information about the vtkusers
mailing list