<div>Hello,</div><div> </div><div>I&#39;ve ran into an issue of VTK exiting the application if an offscreen rendering is requested for a large size render window. VTK has a very unforgiving error handling. It displays a system message box (at least on Windows) and then calls exit(1) if there are no vtkCommand::ExitEvent observers. Even if I install my own ExitEvent observer, VTK will still present a rather user-unfriendly &quot;ChoosePixelFormat failed.&quot; message. Ideally, clients of VTK would want to handle the error in their own way. Is there a reason why VTK doesn&#39;t simply invoke vtkCommand::ErrorEvent?</div>

<div> </div><div>Best Regards,</div><div>Jenya Burstein</div><div> </div><div>void vtkWin32OpenGLRenderWindow::SetupPixelFormat(HDC hDC, DWORD dwFlags, <br>                                                  int debug, int bpp, <br>

                                                  int zbpp)</div><div>{<br>....</div><div>    pixelFormat = ChoosePixelFormat(hDC, &amp;pfd);<br>    if (pixelFormat == 0)<br>      {<br>#ifdef UNICODE<br>      MessageBox(WindowFromDC(hDC), L&quot;ChoosePixelFormat failed.&quot;, L&quot;Error&quot;,<br>

                 MB_ICONERROR | MB_OK);<br>#else<br>      MessageBox(WindowFromDC(hDC), &quot;ChoosePixelFormat failed.&quot;, &quot;Error&quot;,<br>                 MB_ICONERROR | MB_OK);<br>#endif<br>      if (this-&gt;HasObserver(vtkCommand::ExitEvent))<br>

        {<br>        this-&gt;InvokeEvent(vtkCommand::ExitEvent, NULL);<br>        return;<br>        }<br>      else<br>        {<br>        exit(1);<br>        }<br>      }</div><div>....</div><div>}<br></div>