[vtkusers] VTK in dialogbased MFC App ?
de Boer Ingo
I.deBoer at polytec.de
Tue Aug 5 10:06:50 EDT 2003
Hi,
has anbody managed to create a dialogbased MFC-App with
VTK. I have created a picture control (Frame Type). I can set
my Renderer to something like
CWnd* pcWnd = GetDlgItem(IDC_STC_MAIN_WND);
m_pvtkWin32OpenGLRW->SetParentId(::GetParent(pcWnd->m_hWnd));
m_pvtkWin32OpenGLRW->SetWindowId(pcWnd->m_hWnd);
m_pvtkWin32OpenGLRW->WindowInitialize();
m_pvtkWin32RenderWI->SetRenderWindow(m_pvtkWin32OpenGLRW);
LONG OldProc = ::GetWindowLong(pcWnd->m_hWnd, GWL_WNDPROC);
m_pvtkWin32RenderWI->Initialize();
::SetWindowLong(pcWnd->m_hWnd, GWL_WNDPROC, OldProc);
Now I render my scene... which works fine. But I cannot interact ?!
An I don't know why...
I do have
LRESULT CVTKSurfaceReconstructionDlg::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
LRESULT lResult = NULL;
switch (message)
{
[code snip]
case WM_MOUSEMOVE:
if (m_pvtkWin32RenderWI->GetInitialized())
{
CWnd* pcWnd = GetDlgItem(IDC_STC_MAIN_WND)
return vtkHandleMessage2(pcWnd->m_hWnd, message, wParam, lParam, m_pvtkWin32RenderWI);
}
break;
}
return CDialog::WindowProc(message, wParam, lParam);
}
but nothing works... any hints ?
greets
Ingo
More information about the vtkusers
mailing list