Author: cwittich
Date: Fri Jan 5 02:19:11 2007
New Revision: 25298
URL:
http://svn.reactos.org/svn/reactos?rev=25298&view=rev
Log:
activate openfile dialog (doesn't load files yet)
Modified:
trunk/reactos/base/applications/wordpad/editwnd.c
trunk/reactos/base/applications/wordpad/mainwnd.c
trunk/reactos/base/applications/wordpad/opensave.c
trunk/reactos/base/applications/wordpad/precomp.h
Modified: trunk/reactos/base/applications/wordpad/editwnd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wordpad/…
==============================================================================
--- trunk/reactos/base/applications/wordpad/editwnd.c (original)
+++ trunk/reactos/base/applications/wordpad/editwnd.c Fri Jan 5 02:19:11 2007
@@ -147,7 +147,7 @@
Info->OpenInfo = OpenInfo;
hWndEditor = CreateMDIWindow(szEditWndClass,
- OpenInfo->lpImageName,
+ OpenInfo->lpDocumentName,
WS_MAXIMIZE,
CW_USEDEFAULT,
CW_USEDEFAULT,
Modified: trunk/reactos/base/applications/wordpad/mainwnd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wordpad/…
==============================================================================
--- trunk/reactos/base/applications/wordpad/mainwnd.c (original)
+++ trunk/reactos/base/applications/wordpad/mainwnd.c Fri Jan 5 02:19:11 2007
@@ -160,8 +160,8 @@
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 @@
LoadAndFormatString(hInstance,
IDS_DEFAULT_NAME,
- &OpenInfo.lpImageName,
+ &OpenInfo.lpDocumentName,
++Info->ImagesCreated);
Ret = DialogBox(hInstance,
@@ -200,21 +200,21 @@
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;
Modified: trunk/reactos/base/applications/wordpad/opensave.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wordpad/…
==============================================================================
--- trunk/reactos/base/applications/wordpad/opensave.c (original)
+++ trunk/reactos/base/applications/wordpad/opensave.c Fri Jan 5 02:19:11 2007
@@ -30,7 +30,10 @@
{
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 @@
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;
Modified: trunk/reactos/base/applications/wordpad/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wordpad/…
==============================================================================
--- trunk/reactos/base/applications/wordpad/precomp.h (original)
+++ trunk/reactos/base/applications/wordpad/precomp.h Fri Jan 5 02:19:11 2007
@@ -47,9 +47,9 @@
union
{
UINT DocType; /* new */
- LPTSTR lpImagePath; /* open */
+ LPTSTR lpDocumentPath; /* open */
};
- LPTSTR lpImageName;
+ LPTSTR lpDocumentName;
} OPEN_EDIT_INFO, *POPEN_EDIT_INFO;