Added new exception rfb::UnsupportedPixelFormatException.
Added DesktopWindow::getCallback().

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@600 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/win/vncviewer/DesktopWindow.cxx b/win/vncviewer/DesktopWindow.cxx
index 27ef2dc..fce795b 100644
--- a/win/vncviewer/DesktopWindow.cxx
+++ b/win/vncviewer/DesktopWindow.cxx
@@ -25,6 +25,7 @@
 #include <rfb_win32/MonitorInfo.h>
 #include <rfb_win32/DeviceContext.h>
 #include <rfb_win32/Win32Util.h>
+#include <rfb_win32/MsgBox.h>
 #include <vncviewer/DesktopWindow.h>
 #include <vncviewer/resource.h>
 
@@ -70,6 +71,9 @@
 
   try {
     result = _this->processMessage(msg, wParam, lParam);
+  } catch (rfb::UnsupportedPixelFormatException &e) {
+    MsgBox(0, e.str(), MB_OK);
+    _this->getCallback()->closeWindow();
   } catch (rdr::Exception& e) {
     vlog.error("untrapped: %s", e.str());
   }