[Bugfix] Fix MS Visual Studio 2008 compilation issues.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3912 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/win/vncviewer/DesktopWindow.cxx b/win/vncviewer/DesktopWindow.cxx
index 744149d..49b6c3f 100644
--- a/win/vncviewer/DesktopWindow.cxx
+++ b/win/vncviewer/DesktopWindow.cxx
@@ -75,7 +75,7 @@
try {
result = _this->processMessage(msg, wParam, lParam);
} catch (rfb::UnsupportedPixelFormatException &e) {
- MsgBox(0, e.str(), MB_OK | MB_ICONINFORMATION);
+ MsgBox(0, (TCHAR *) e.str(), MB_OK | MB_ICONINFORMATION);
_this->getCallback()->closeWindow();
} catch (rdr::Exception& e) {
vlog.error("untrapped: %s", e.str());
diff --git a/win/vncviewer/OptionsDialog.cxx b/win/vncviewer/OptionsDialog.cxx
index f856251..6b4b644 100644
--- a/win/vncviewer/OptionsDialog.cxx
+++ b/win/vncviewer/OptionsDialog.cxx
@@ -175,7 +175,7 @@
(WPARAM)i, (LPARAM)(int FAR*)scale_values[i]);
}
if (dlg->options.autoScaling) {
- SetDlgItemText(handle, IDC_COMBO_SCALE, "Auto");
+ SetDlgItemText(handle, IDC_COMBO_SCALE, (LPCTSTR) "Auto");
} else {
SetDlgItemInt(handle, IDC_COMBO_SCALE, dlg->options.scale, FALSE);
}
@@ -195,8 +195,8 @@
dlg->options.autoScaling = false;
} else {
char scaleStr[20];
- GetDlgItemText(handle, IDC_COMBO_SCALE, scaleStr, 20);
- if (strcmp(scaleStr, "Auto") == 0) {
+ GetDlgItemText(handle, IDC_COMBO_SCALE, (LPTSTR) scaleStr, 20);
+ if (strcmp(scaleStr, (const char *) "Auto") == 0) {
dlg->options.autoScaling = true;
}
}
@@ -212,7 +212,7 @@
int index = SendMessage(handleComboScale, CB_GETCURSEL, 0, 0);
SendMessage(handleComboScale, CB_GETLBTEXT, (WPARAM)index, (LPARAM)scaleStr);
} else {
- GetDlgItemText(handle, IDC_COMBO_SCALE, scaleStr, 20);
+ GetDlgItemText(handle, IDC_COMBO_SCALE, (LPTSTR) scaleStr, 20);
}
return true;
}
diff --git a/win/vncviewer/ViewerToolBar.cxx b/win/vncviewer/ViewerToolBar.cxx
index 38e84c4..13a6411 100644
--- a/win/vncviewer/ViewerToolBar.cxx
+++ b/win/vncviewer/ViewerToolBar.cxx
@@ -63,34 +63,34 @@
switch (TTStr->hdr.idFrom) {
case ID_OPTIONS:
- TTStr->lpszText = "Connection options...";
+ TTStr->lpszText = (LPTSTR) "Connection options...";
break;
case ID_INFO:
- TTStr->lpszText = "Connection info";
+ TTStr->lpszText = (LPTSTR) "Connection info";
break;
case ID_FULLSCREEN:
- TTStr->lpszText = "Full screen";
+ TTStr->lpszText = (LPTSTR) "Full screen";
break;
case ID_REQUEST_REFRESH:
- TTStr->lpszText = "Request screen refresh";
+ TTStr->lpszText = (LPTSTR) "Request screen refresh";
break;
case ID_SEND_CAD:
- TTStr->lpszText = "Send Ctrl-Alt-Del";
+ TTStr->lpszText = (LPTSTR) "Send Ctrl-Alt-Del";
break;
case ID_SEND_CTLESC:
- TTStr->lpszText = "Send Ctrl-Esc";
+ TTStr->lpszText = (LPTSTR) "Send Ctrl-Esc";
break;
case ID_CTRL_KEY:
- TTStr->lpszText = "Send Ctrl key press/release";
+ TTStr->lpszText = (LPTSTR) "Send Ctrl key press/release";
break;
case ID_ALT_KEY:
- TTStr->lpszText = "Send Alt key press/release";
+ TTStr->lpszText = (LPTSTR) "Send Alt key press/release";
break;
case ID_NEW_CONNECTION:
- TTStr->lpszText = "New connection...";
+ TTStr->lpszText = (LPTSTR) "New connection...";
break;
case ID_CONN_SAVE_AS:
- TTStr->lpszText = "Save connection info as...";
+ TTStr->lpszText = (LPTSTR) "Save connection info as...";
break;
default:
break;
diff --git a/win/vncviewer/vncviewer.rc b/win/vncviewer/vncviewer.rc
index a90c959..64818da 100644
--- a/win/vncviewer/vncviewer.rc
+++ b/win/vncviewer/vncviewer.rc
@@ -7,7 +7,11 @@
//
// Generated from the TEXTINCLUDE 2 resource.
//
-#include "afxres.h"
+#include "windows.h"
+
+#ifndef IDC_STATIC
+#define IDC_STATIC -1
+#endif
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
@@ -34,7 +38,7 @@
2 TEXTINCLUDE DISCARDABLE
BEGIN
- "#include ""afxres.h""\r\n"
+ "#include ""windows.h""\r\n"
"\0"
END