Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
bd2734d9
Commit
bd2734d9
authored
Jul 11, 2008
by
Alexander Nicolaysen Sørnes
Committed by
Alexandre Julliard
Jul 14, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wordpad: Show error message if saving fails.
parent
e3efa88c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
0 deletions
+25
-0
En.rc
programs/wordpad/En.rc
+2
-0
No.rc
programs/wordpad/No.rc
+2
-0
wordpad.c
programs/wordpad/wordpad.c
+19
-0
wordpad.h
programs/wordpad/wordpad.h
+2
-0
No files found.
programs/wordpad/En.rc
View file @
bd2734d9
...
...
@@ -234,4 +234,6 @@ BEGIN
"Are you sure that you wish to do this?"
STRING_INVALID_NUMBER, "Invalid number format"
STRING_OLE_STORAGE_NOT_SUPPORTED, "OLE storage documents are not supported"
STRING_WRITE_FAILED, "Could not save the file."
STRING_WRITE_ACCESS_DENIED, "You do not have access to save the file."
END
programs/wordpad/No.rc
View file @
bd2734d9
...
...
@@ -234,4 +234,6 @@ BEGIN
"sikker p at du vil fortsette?"
STRING_INVALID_NUMBER, "Ugyldig tallformat"
STRING_OLE_STORAGE_NOT_SUPPORTED, "OLE storage documents are not supported"
STRING_WRITE_FAILED, "Klarte ikke lagre filen."
STRING_WRITE_ACCESS_DENIED, "Du har ikke tilgang til lagre filen."
END
programs/wordpad/wordpad.c
View file @
bd2734d9
...
...
@@ -753,6 +753,22 @@ static void DoOpenFile(LPCWSTR szOpenFileName)
update_font_list
();
}
static
void
ShowWriteError
(
DWORD
Code
)
{
LPWSTR
Message
;
switch
(
Code
)
{
case
ERROR_ACCESS_DENIED
:
Message
=
MAKEINTRESOURCEW
(
STRING_WRITE_ACCESS_DENIED
);
break
;
default:
Message
=
MAKEINTRESOURCEW
(
STRING_WRITE_FAILED
);
}
MessageBoxW
(
hMainWnd
,
Message
,
wszAppTitle
,
MB_ICONEXCLAMATION
|
MB_OK
);
}
static
void
DoSaveFile
(
LPCWSTR
wszSaveFileName
,
WPARAM
format
)
{
HANDLE
hFile
;
...
...
@@ -763,7 +779,10 @@ static void DoSaveFile(LPCWSTR wszSaveFileName, WPARAM format)
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
hFile
==
INVALID_HANDLE_VALUE
)
{
ShowWriteError
(
GetLastError
());
return
;
}
if
(
format
==
(
SF_TEXT
|
SF_UNICODE
))
{
...
...
programs/wordpad/wordpad.h
View file @
bd2734d9
...
...
@@ -193,6 +193,8 @@
#define STRING_SAVE_LOSEFORMATTING 1704
#define STRING_INVALID_NUMBER 1705
#define STRING_OLE_STORAGE_NOT_SUPPORTED 1706
#define STRING_WRITE_FAILED 1707
#define STRING_WRITE_ACCESS_DENIED 1708
LPWSTR
file_basename
(
LPWSTR
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment