I've already implement a VTK render window in my MFC window, everything works well except I have to click the render window again to make the key press events get called. It seems my MFC window is intercepting the key pressed events. Is there any method to help me focus the cursor at the render window?
Clicking the window before entering a key is really annoying.
Here is my code:
this->mainView = new vtkMFCWindow(this->GetDlgItem(IDC_MAIN_VIEW));
vtkSmartPointer<vtkInteractorStyleImage> imageStyle = vtkSmartPointer<vtkInteractorStyleImage>::New();