mirror of
https://github.com/reactos/reactos.git
synced 2024-09-06 10:52:52 +00:00
implement Save As dialog
svn path=/trunk/; revision=30392
This commit is contained in:
parent
1d9f599737
commit
736f7a1dc9
|
@ -24,6 +24,30 @@
|
|||
|
||||
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 @@ GeneralDlgProc(HWND hDlg,
|
|||
SaveAllSettings(pInfo);
|
||||
SaveRdpSettingsToFile(NULL, pInfo->pRdpSettings);
|
||||
break;
|
||||
|
||||
case IDC_SAVEAS:
|
||||
DoSaveAs(pInfo);
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -827,7 +855,6 @@ DisplayDlgProc(HWND hDlg,
|
|||
}
|
||||
|
||||
|
||||
|
||||
static BOOL
|
||||
OnMainCreate(HWND hwnd,
|
||||
PRDPSETTINGS pRdpSettings)
|
||||
|
@ -835,6 +862,7 @@ OnMainCreate(HWND hwnd,
|
|||
PINFO pInfo;
|
||||
TCITEMW item;
|
||||
BOOL bRet = FALSE;
|
||||
HWND hUnderGry, hUnderWht;
|
||||
|
||||
pInfo = HeapAlloc(GetProcessHeap(),
|
||||
HEAP_ZERO_MEMORY,
|
||||
|
@ -889,6 +917,7 @@ OnMainCreate(HWND hwnd,
|
|||
&pInfo->headerbitmap);
|
||||
}
|
||||
|
||||
/* setup the tabs */
|
||||
pInfo->hTab = GetDlgItem(hwnd, IDC_TAB);
|
||||
if (pInfo->hTab)
|
||||
{
|
||||
|
|
|
@ -14,7 +14,7 @@ BEGIN
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue