mirror of
https://github.com/reactos/reactos.git
synced 2025-06-01 23:48:12 +00:00
activate openfile dialog (doesn't load files yet)
svn path=/trunk/; revision=25298
This commit is contained in:
parent
9b2c97c827
commit
6b47dbcdc8
4 changed files with 18 additions and 14 deletions
|
@ -147,7 +147,7 @@ CreateEditWindow(struct _MAIN_WND_INFO *MainWnd,
|
|||
Info->OpenInfo = OpenInfo;
|
||||
|
||||
hWndEditor = CreateMDIWindow(szEditWndClass,
|
||||
OpenInfo->lpImageName,
|
||||
OpenInfo->lpDocumentName,
|
||||
WS_MAXIMIZE,
|
||||
CW_USEDEFAULT,
|
||||
CW_USEDEFAULT,
|
||||
|
|
|
@ -160,8 +160,8 @@ MainWndCommand(PMAIN_WND_INFO Info,
|
|||
WORD CmdId,
|
||||
HWND hControl)
|
||||
{
|
||||
//static TCHAR szFileName[MAX_PATH];
|
||||
//static TCHAR szImageName[MAX_PATH];
|
||||
static TCHAR szFileName[MAX_PATH];
|
||||
static TCHAR szDocumentName[MAX_PATH];
|
||||
|
||||
UNREFERENCED_PARAMETER(hControl);
|
||||
|
||||
|
@ -176,7 +176,7 @@ MainWndCommand(PMAIN_WND_INFO Info,
|
|||
|
||||
LoadAndFormatString(hInstance,
|
||||
IDS_DEFAULT_NAME,
|
||||
&OpenInfo.lpImageName,
|
||||
&OpenInfo.lpDocumentName,
|
||||
++Info->ImagesCreated);
|
||||
|
||||
Ret = DialogBox(hInstance,
|
||||
|
@ -200,21 +200,21 @@ MainWndCommand(PMAIN_WND_INFO Info,
|
|||
|
||||
case ID_OPEN:
|
||||
{
|
||||
/* OPEN_EDIT_INFO OpenInfo;
|
||||
OPEN_EDIT_INFO OpenInfo;
|
||||
|
||||
if (DoOpenFile(Info->hSelf,
|
||||
szFileName, / * full file path * /
|
||||
szImageName)) / * file name * /
|
||||
szFileName, /* full file path */
|
||||
szDocumentName)) /* file name */
|
||||
{
|
||||
OpenInfo.CreateNew = FALSE;
|
||||
|
||||
OpenInfo.Open.lpImagePath = szFileName;
|
||||
OpenInfo.lpImageName = szImageName;
|
||||
OpenInfo.lpDocumentPath = szFileName;
|
||||
OpenInfo.lpDocumentName = szDocumentName;
|
||||
|
||||
CreateEditWindow(Info,
|
||||
&OpenInfo);
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -30,7 +30,10 @@ DoOpenFile(HWND hwnd,
|
|||
{
|
||||
DWORD err;
|
||||
|
||||
static TCHAR Filter[] = _T("RichText files (*.rtf)\0*.rtf\0");
|
||||
static TCHAR Filter[] = _T("All documents (*.txt,*.rtf)\0*.txt;*.rtf\0") \
|
||||
_T("Rich Text Document (*.rtf)\0*.rtf\0") \
|
||||
_T("Text Document (*.txt)\0*.txt\0");
|
||||
|
||||
|
||||
ofn.lpstrFilter = Filter;
|
||||
ofn.lpstrFile = szFileName;
|
||||
|
@ -56,7 +59,8 @@ BOOL
|
|||
DoSaveFile(HWND hwnd)
|
||||
{
|
||||
TCHAR szFileName[MAX_PATH] = _T("");
|
||||
static TCHAR Filter[] = _T("RichText files (*.rtf)\0*.rtf\0");
|
||||
static TCHAR Filter[] = _T("Rich Text Document (*.rtf)\0*.rtf\0") \
|
||||
_T("Text Document (*.txt)\0*.txt\0");
|
||||
|
||||
ofn.lpstrFilter = Filter;
|
||||
ofn.lpstrFile = szFileName;
|
||||
|
|
|
@ -47,9 +47,9 @@ typedef struct _OPEN_EDIT_INFO
|
|||
union
|
||||
{
|
||||
UINT DocType; /* new */
|
||||
LPTSTR lpImagePath; /* open */
|
||||
LPTSTR lpDocumentPath; /* open */
|
||||
};
|
||||
LPTSTR lpImageName;
|
||||
LPTSTR lpDocumentName;
|
||||
|
||||
} OPEN_EDIT_INFO, *POPEN_EDIT_INFO;
|
||||
|
||||
|
|
Loading…
Reference in a new issue