mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:12:57 +00:00
implement Save As dialog
svn path=/trunk/; revision=30392
This commit is contained in:
parent
1d9f599737
commit
736f7a1dc9
2 changed files with 31 additions and 2 deletions
|
@ -24,6 +24,30 @@
|
||||||
|
|
||||||
HINSTANCE hInst;
|
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
|
static VOID
|
||||||
OnTabWndSelChange(PINFO pInfo)
|
OnTabWndSelChange(PINFO pInfo)
|
||||||
{
|
{
|
||||||
|
@ -228,6 +252,10 @@ GeneralDlgProc(HWND hDlg,
|
||||||
SaveAllSettings(pInfo);
|
SaveAllSettings(pInfo);
|
||||||
SaveRdpSettingsToFile(NULL, pInfo->pRdpSettings);
|
SaveRdpSettingsToFile(NULL, pInfo->pRdpSettings);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case IDC_SAVEAS:
|
||||||
|
DoSaveAs(pInfo);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -827,7 +855,6 @@ DisplayDlgProc(HWND hDlg,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static BOOL
|
static BOOL
|
||||||
OnMainCreate(HWND hwnd,
|
OnMainCreate(HWND hwnd,
|
||||||
PRDPSETTINGS pRdpSettings)
|
PRDPSETTINGS pRdpSettings)
|
||||||
|
@ -835,6 +862,7 @@ OnMainCreate(HWND hwnd,
|
||||||
PINFO pInfo;
|
PINFO pInfo;
|
||||||
TCITEMW item;
|
TCITEMW item;
|
||||||
BOOL bRet = FALSE;
|
BOOL bRet = FALSE;
|
||||||
|
HWND hUnderGry, hUnderWht;
|
||||||
|
|
||||||
pInfo = HeapAlloc(GetProcessHeap(),
|
pInfo = HeapAlloc(GetProcessHeap(),
|
||||||
HEAP_ZERO_MEMORY,
|
HEAP_ZERO_MEMORY,
|
||||||
|
@ -889,6 +917,7 @@ OnMainCreate(HWND hwnd,
|
||||||
&pInfo->headerbitmap);
|
&pInfo->headerbitmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* setup the tabs */
|
||||||
pInfo->hTab = GetDlgItem(hwnd, IDC_TAB);
|
pInfo->hTab = GetDlgItem(hwnd, IDC_TAB);
|
||||||
if (pInfo->hTab)
|
if (pInfo->hTab)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,7 +14,7 @@ BEGIN
|
||||||
LTEXT "User name:",IDC_STATIC,47,58,38,8
|
LTEXT "User name:",IDC_STATIC,47,58,38,8
|
||||||
COMBOBOX IDC_SERVERCOMBO,79,39,141,150,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_SERVERCOMBO,79,39,141,150,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||||
PUSHBUTTON "Save",IDC_SAVE,67,139,50,14
|
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
|
PUSHBUTTON "Open...",IDC_OPEN,177,139,50,14
|
||||||
ICON "", IDC_CONNICON, 16,114,20,20
|
ICON "", IDC_CONNICON, 16,114,20,20
|
||||||
LTEXT "Save the current connection settings or open an existing config",IDC_STATIC,50,115,172,20
|
LTEXT "Save the current connection settings or open an existing config",IDC_STATIC,50,115,172,20
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue