From: george82 Date: Wed, 24 May 2006 15:49:05 +0000 (+0000) Subject: Added the scale controls to the vncviewer options dialog. X-Git-Tag: v0.0.90~384^2~285 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f233addb86b7ef9d177c08b47478996657cd9704;p=tigervnc.git Added the scale controls to the vncviewer options dialog. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@587 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- diff --git a/vncviewer/OptionsDialog.cxx b/vncviewer/OptionsDialog.cxx index 2e43b38f..da24cf1b 100644 --- a/vncviewer/OptionsDialog.cxx +++ b/vncviewer/OptionsDialog.cxx @@ -163,6 +163,15 @@ public: setItemChecked(IDC_ACCEPT_BELL, dlg->options.acceptBell); setItemChecked(IDC_AUTO_RECONNECT, dlg->options.autoReconnect); setItemChecked(IDC_SHOW_TOOLBAR, dlg->options.showToolbar); + char scale_values[8][20] = { + "25","50","75","90","100","125","150","Auto" + }; + HWND hScaleCombo = GetDlgItem(handle, IDC_COMBO_SCALE); + for (int i = 0; i <= 7; i++) { + SendMessage(hScaleCombo, CB_INSERTSTRING, + (WPARAM)i, (LPARAM)(int FAR*)scale_values[i]); + } + SetDlgItemText(handle, IDC_COMBO_SCALE, "100"); } virtual bool onOk() { dlg->options.shared = isItemChecked(IDC_CONN_SHARED); diff --git a/vncviewer/resource.h b/vncviewer/resource.h index 5493fd0b..7fb32fe3 100644 --- a/vncviewer/resource.h +++ b/vncviewer/resource.h @@ -120,6 +120,9 @@ #define IDC_FTREMOTELIST 1094 #define IDC_ALLOW_JPEG 1095 #define IDC_FTLOCALRELOAD 1096 +#define IDC_STATIC_SCALE 1097 +#define IDC_COMBO_SCALE 1098 +#define IDC_STATIC_PERCENT 1099 #define ID_TOOLBAR 40002 #define ID_CLOSE 40003 #define ID_OPTIONS 40004 @@ -148,7 +151,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 134 #define _APS_NEXT_COMMAND_VALUE 40028 -#define _APS_NEXT_CONTROL_VALUE 1097 +#define _APS_NEXT_CONTROL_VALUE 1100 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif diff --git a/vncviewer/vncviewer.rc b/vncviewer/vncviewer.rc index ea5dd65c..b71f1802 100644 --- a/vncviewer/vncviewer.rc +++ b/vncviewer/vncviewer.rc @@ -223,7 +223,7 @@ BEGIN CONTROL "Show toolbar",IDC_SHOW_TOOLBAR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,106,25,100,15 CONTROL "Render cursor locally",IDC_LOCAL_CURSOR,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,7,40,199,15 + BS_AUTOCHECKBOX | WS_TABSTOP,7,40,99,15 CONTROL "Allow dynamic desktop resizing",IDC_DESKTOP_RESIZE, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,55,199,15 CONTROL "Only use protocol version 3.3",IDC_PROTOCOL_3_3,"Button", @@ -232,6 +232,10 @@ BEGIN "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,85,199,15 CONTROL "Offer to automatically reconnect",IDC_AUTO_RECONNECT, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,100,199,15 + LTEXT "Scale by:",IDC_STATIC_SCALE,106,40,34,15,SS_CENTERIMAGE + COMBOBOX IDC_COMBO_SCALE,140,40,40,30,CBS_DROPDOWN | CBS_SORT | + WS_VSCROLL | WS_TABSTOP + LTEXT "%",IDC_STATIC_PERCENT,185,40,21,15,SS_CENTERIMAGE END IDD_INPUTS DIALOG DISCARDABLE 0, 0, 186, 162