Remove legacy Windows code

We have lots of code that deals with Windows versions that we no
longer support anyway. Clean out all of this old cruft.
diff --git a/win/vncconfig/Authentication.h b/win/vncconfig/Authentication.h
index c2aba91..7fa85a2 100644
--- a/win/vncconfig/Authentication.h
+++ b/win/vncconfig/Authentication.h
@@ -21,7 +21,6 @@
 #include <vncconfig/PasswordDialog.h>
 #include <rfb_win32/Registry.h>
 #include <rfb_win32/SecurityPage.h>
-#include <rfb_win32/OSVersion.h>
 #include <rfb_win32/MsgBox.h>
 #include <rfb/ServerCore.h>
 #include <rfb/Security.h>
@@ -87,7 +86,7 @@
         registryInsecure = warn;
       }
       bool enableQueryOnlyIfLoggedOn() {
-        return isItemChecked(IDC_QUERY_CONNECT) && osVersion.isPlatformNT && (osVersion.dwMajorVersion >= 5);
+        return isItemChecked(IDC_QUERY_CONNECT);
       }
 
 
diff --git a/win/vncconfig/Desktop.h b/win/vncconfig/Desktop.h
index 6479cb2..1a687d7 100644
--- a/win/vncconfig/Desktop.h
+++ b/win/vncconfig/Desktop.h
@@ -21,7 +21,6 @@
 #include <rfb_win32/Registry.h>
 #include <rfb_win32/Dialog.h>
 #include <rfb_win32/SDisplay.h>
-#include <rfb_win32/DynamicFn.h>
 
 namespace rfb {
 
@@ -35,20 +34,10 @@
         CharArray action(rfb::win32::SDisplay::disconnectAction.getData());
         bool disconnectLock = stricmp(action.buf, "Lock") == 0;
         bool disconnectLogoff = stricmp(action.buf, "Logoff") == 0;
-        typedef BOOL (WINAPI *_LockWorkStation_proto)();
-        DynamicFn<_LockWorkStation_proto> _LockWorkStation(_T("user32.dll"), "LockWorkStation");
-        if (!_LockWorkStation.isValid()) {
-          enableItem(IDC_DISCONNECT_LOCK, false);
-          if (disconnectLock) {
-            disconnectLogoff = true;
-            disconnectLock = false;
-          }
-        }
         setItemChecked(IDC_DISCONNECT_LOGOFF, disconnectLogoff);
         setItemChecked(IDC_DISCONNECT_LOCK, disconnectLock);
         setItemChecked(IDC_DISCONNECT_NONE, !disconnectLock && !disconnectLogoff);
         setItemChecked(IDC_REMOVE_WALLPAPER, rfb::win32::SDisplay::removeWallpaper);
-        setItemChecked(IDC_REMOVE_PATTERN, rfb::win32::SDisplay::removePattern);
         setItemChecked(IDC_DISABLE_EFFECTS, rfb::win32::SDisplay::disableEffects);
       }
       bool onCommand(int id, int cmd) {
@@ -57,7 +46,6 @@
         case IDC_DISCONNECT_LOCK:
         case IDC_DISCONNECT_NONE:
         case IDC_REMOVE_WALLPAPER:
-        case IDC_REMOVE_PATTERN:
         case IDC_DISABLE_EFFECTS:
           CharArray action(rfb::win32::SDisplay::disconnectAction.getData());
           bool disconnectLock = stricmp(action.buf, "Lock") == 0;
@@ -65,7 +53,6 @@
           setChanged((disconnectLogoff != isItemChecked(IDC_DISCONNECT_LOGOFF)) ||
                      (disconnectLock != isItemChecked(IDC_DISCONNECT_LOCK)) ||
                      (isItemChecked(IDC_REMOVE_WALLPAPER) != rfb::win32::SDisplay::removeWallpaper) ||
-                     (isItemChecked(IDC_REMOVE_PATTERN) != rfb::win32::SDisplay::removePattern) ||
                      (isItemChecked(IDC_DISABLE_EFFECTS) != rfb::win32::SDisplay::disableEffects));
           break;
         }
@@ -79,7 +66,6 @@
           action = _T("Lock");
         regKey.setString(_T("DisconnectAction"), action);
         regKey.setBool(_T("RemoveWallpaper"), isItemChecked(IDC_REMOVE_WALLPAPER));
-        regKey.setBool(_T("RemovePattern"), isItemChecked(IDC_REMOVE_PATTERN));
         regKey.setBool(_T("DisableEffects"), isItemChecked(IDC_DISABLE_EFFECTS));
         return true;
       }
diff --git a/win/vncconfig/Hooking.h b/win/vncconfig/Hooking.h
index b8137dd..f5ef8b7 100644
--- a/win/vncconfig/Hooking.h
+++ b/win/vncconfig/Hooking.h
@@ -34,13 +34,9 @@
         : PropSheetPage(GetModuleHandle(0), MAKEINTRESOURCE(IDD_HOOKING)), regKey(rk) {}
       void initDialog() {
         setItemChecked(IDC_USEPOLLING, rfb::win32::SDisplay::updateMethod == 0);
-        setItemChecked(IDC_USEHOOKS, (rfb::win32::SDisplay::updateMethod == 1) &&
-                       rfb::win32::SDisplay::areHooksAvailable());
-        enableItem(IDC_USEHOOKS, rfb::win32::SDisplay::areHooksAvailable());
+        setItemChecked(IDC_USEHOOKS, (rfb::win32::SDisplay::updateMethod == 1));
         setItemChecked(IDC_POLLCONSOLES, rfb::win32::WMPoller::poll_console_windows);
-        setItemChecked(IDC_CAPTUREBLT, osVersion.isPlatformNT &&
-                       rfb::win32::DeviceFrameBuffer::useCaptureBlt);
-        enableItem(IDC_CAPTUREBLT, osVersion.isPlatformNT);
+        setItemChecked(IDC_CAPTUREBLT, rfb::win32::DeviceFrameBuffer::useCaptureBlt);
         onCommand(IDC_USEHOOKS, 0);
       }
       bool onCommand(int id, int cmd) {
diff --git a/win/vncconfig/Inputs.h b/win/vncconfig/Inputs.h
index 1e0b4ba..2ad3b42 100644
--- a/win/vncconfig/Inputs.h
+++ b/win/vncconfig/Inputs.h
@@ -25,7 +25,6 @@
 
 #include <rfb_win32/Registry.h>
 #include <rfb_win32/Dialog.h>
-#include <rfb_win32/OSVersion.h>
 #include <rfb/ServerCore.h>
 
 namespace rfb {
@@ -42,7 +41,6 @@
         setItemChecked(IDC_ACCEPT_CUTTEXT, rfb::Server::acceptCutText);
         setItemChecked(IDC_SEND_CUTTEXT, rfb::Server::sendCutText);
         setItemChecked(IDC_DISABLE_LOCAL_INPUTS, SDisplay::disableLocalInputs);
-        enableItem(IDC_DISABLE_LOCAL_INPUTS, !osVersion.isPlatformWindows);
         BOOL blocked = FALSE;
         if (SystemParametersInfo(SPI_GETBLOCKSENDINPUTRESETS, 0, &blocked, 0))
           setItemChecked(IDC_AFFECT_SCREENSAVER, !blocked);
diff --git a/win/vncconfig/Legacy.cxx b/win/vncconfig/Legacy.cxx
index f8c2028..7d51de8 100644
--- a/win/vncconfig/Legacy.cxx
+++ b/win/vncconfig/Legacy.cxx
@@ -206,8 +206,7 @@
         regKey.setInt(_T("IdleTimeout"), key.getInt(_T("IdleTimeout"), 0));
 
         regKey.setBool(_T("RemoveWallpaper"), key.getBool(_T("RemoveWallpaper")));
-        regKey.setBool(_T("RemovePattern"), key.getBool(_T("RemoveWallpaper")));
-        regKey.setBool(_T("DisableEffects"), key.getBool(_T("RemoveWallpaper")));
+        regKey.setBool(_T("DisableEffects"), key.getBool(_T("DisableEffects")));
 
         if (key.getInt(_T("QuerySetting"), 2) != 2) {
           regKey.setBool(_T("QueryConnect"), key.getInt(_T("QuerySetting")) > 2);
diff --git a/win/vncconfig/resource.h b/win/vncconfig/resource.h
index 7b8e647..243f824 100644
--- a/win/vncconfig/resource.h
+++ b/win/vncconfig/resource.h
@@ -64,7 +64,6 @@
 #define IDC_DISCONNECT_LOCK             1057
 #define IDC_DISCONNECT_LOGOFF           1058
 #define IDC_REMOVE_WALLPAPER            1059
-#define IDC_REMOVE_PATTERN              1060
 #define IDC_DISABLE_EFFECTS             1061
 #define IDC_CAPTUREBLT                  1062
 #define IDC_QUERY                       1064
diff --git a/win/vncconfig/vncconfig.cxx b/win/vncconfig/vncconfig.cxx
index b1d0eef..18045c7 100644
--- a/win/vncconfig/vncconfig.cxx
+++ b/win/vncconfig/vncconfig.cxx
@@ -135,7 +135,6 @@
         } else if (e.err != ERROR_CALL_NOT_IMPLEMENTED &&
                    e.err != ERROR_NOT_LOGGED_ON) {
           // If the call is not implemented, ignore the error and continue
-          // If we are on Win9x and no user is logged on, ignore error and continue
           throw;
         }
         warnOnChangePassword = true;
diff --git a/win/vncconfig/vncconfig.rc b/win/vncconfig/vncconfig.rc
index ebcf720..ae1057a 100644
--- a/win/vncconfig/vncconfig.rc
+++ b/win/vncconfig/vncconfig.rc
@@ -241,20 +241,18 @@
 CAPTION "Desktop"
 FONT 8, "MS Sans Serif"
 BEGIN
-    GROUPBOX        "While connected",IDC_STATIC,7,5,171,60
+    GROUPBOX        "While connected",IDC_STATIC,7,5,171,45
     CONTROL         "Remove wallpaper",IDC_REMOVE_WALLPAPER,"Button",
                     BS_AUTOCHECKBOX | WS_TABSTOP,15,15,155,15
-    CONTROL         "Remove background pattern",IDC_REMOVE_PATTERN,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,15,30,155,15
     CONTROL         "Disable user interface effects",IDC_DISABLE_EFFECTS,
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,46,155,14
-    GROUPBOX        "When last client disconnects",IDC_STATIC,7,70,171,60
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,30,155,14
+    GROUPBOX        "When last client disconnects",IDC_STATIC,7,55,171,60
     CONTROL         "Do nothing",IDC_DISCONNECT_NONE,"Button",
-                    BS_AUTORADIOBUTTON,15,80,155,15
+                    BS_AUTORADIOBUTTON,15,65,155,15
     CONTROL         "Lock workstation",IDC_DISCONNECT_LOCK,"Button",
-                    BS_AUTORADIOBUTTON,15,95,155,15
+                    BS_AUTORADIOBUTTON,15,80,155,15
     CONTROL         "Logoff user",IDC_DISCONNECT_LOGOFF,"Button",
-                    BS_AUTORADIOBUTTON,15,110,155,15
+                    BS_AUTORADIOBUTTON,15,95,155,15
 END