Author: gedmurphy
Date: Mon Nov 12 17:45:20 2007
New Revision: 30392
URL:
http://svn.reactos.org/svn/reactos?rev=30392&view=rev
Log:
implement Save As dialog
Modified:
trunk/reactos/base/applications/mstsc/connectdialog.c
trunk/reactos/base/applications/mstsc/lang/en-US.rc
Modified: trunk/reactos/base/applications/mstsc/connectdialog.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/co…
==============================================================================
--- trunk/reactos/base/applications/mstsc/connectdialog.c (original)
+++ trunk/reactos/base/applications/mstsc/connectdialog.c Mon Nov 12 17:45:20 2007
@@ -23,6 +23,30 @@
#define MAX_KEY_NAME 255
HINSTANCE hInst;
+
+static VOID
+DoSaveAs(PINFO pInfo)
+{
+ OPENFILENAME ofn;
+ WCHAR szFileName[MAX_PATH] = L"";
+ static WCHAR szFilter[] = L"Remote Desktop Files (*rdp)\0*.rdp\0";
+
+ ZeroMemory(&ofn, sizeof(ofn));
+ ofn.lStructSize = sizeof(OPENFILENAME);
+ ofn.hwndOwner = pInfo->hGeneralPage;
+ ofn.nMaxFile = MAX_PATH;
+ ofn.nMaxFileTitle = MAX_PATH;
+ ofn.lpstrDefExt = L"rdp";
+ ofn.lpstrFilter = szFilter;
+ ofn.lpstrFile = szFileName;
+ ofn.Flags = OFN_EXPLORER | OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT;
+
+ if (GetSaveFileName(&ofn))
+ {
+ SaveAllSettings(pInfo);
+ SaveRdpSettingsToFile(szFileName, pInfo->pRdpSettings);
+ }
+}
static VOID
OnTabWndSelChange(PINFO pInfo)
@@ -228,6 +252,10 @@
SaveAllSettings(pInfo);
SaveRdpSettingsToFile(NULL, pInfo->pRdpSettings);
break;
+
+ case IDC_SAVEAS:
+ DoSaveAs(pInfo);
+ break;
}
break;
@@ -827,7 +855,6 @@
}
-
static BOOL
OnMainCreate(HWND hwnd,
PRDPSETTINGS pRdpSettings)
@@ -835,6 +862,7 @@
PINFO pInfo;
TCITEMW item;
BOOL bRet = FALSE;
+ HWND hUnderGry, hUnderWht;
pInfo = HeapAlloc(GetProcessHeap(),
HEAP_ZERO_MEMORY,
@@ -889,6 +917,7 @@
&pInfo->headerbitmap);
}
+ /* setup the tabs */
pInfo->hTab = GetDlgItem(hwnd, IDC_TAB);
if (pInfo->hTab)
{
Modified: trunk/reactos/base/applications/mstsc/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/la…
==============================================================================
--- trunk/reactos/base/applications/mstsc/lang/en-US.rc (original)
+++ trunk/reactos/base/applications/mstsc/lang/en-US.rc Mon Nov 12 17:45:20 2007
@@ -14,7 +14,7 @@
LTEXT "User name:",IDC_STATIC,47,58,38,8
COMBOBOX IDC_SERVERCOMBO,79,39,141,150,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Save",IDC_SAVE,67,139,50,14
- PUSHBUTTON "SaveAs...",IDC_SAVEAS,123,139,50,14
+ PUSHBUTTON "Save As...",IDC_SAVEAS,123,139,50,14
PUSHBUTTON "Open...",IDC_OPEN,177,139,50,14
ICON "", IDC_CONNICON, 16,114,20,20
LTEXT "Save the current connection settings or open an existing
config",IDC_STATIC,50,115,172,20