Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
868a2b04
Commit
868a2b04
authored
May 07, 2005
by
Kevin Koltzau
Committed by
Alexandre Julliard
May 07, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle notepad log feature.
parent
216ae64f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
dialog.c
programs/notepad/dialog.c
+14
-0
No files found.
programs/notepad/dialog.c
View file @
868a2b04
...
...
@@ -206,10 +206,12 @@ BOOL DoCloseFile(void)
void
DoOpenFile
(
LPCWSTR
szFileName
)
{
static
const
WCHAR
dotlog
[]
=
{
'.'
,
'L'
,
'O'
,
'G'
,
0
};
HANDLE
hFile
;
LPSTR
pTemp
;
DWORD
size
;
DWORD
dwNumRead
;
WCHAR
log
[
5
];
/* Close any files and prompt to save changes */
if
(
!
DoCloseFile
())
...
...
@@ -266,6 +268,18 @@ void DoOpenFile(LPCWSTR szFileName)
SendMessage
(
Globals
.
hEdit
,
EM_SETMODIFY
,
FALSE
,
0
);
SendMessage
(
Globals
.
hEdit
,
EM_EMPTYUNDOBUFFER
,
0
,
0
);
SetFocus
(
Globals
.
hEdit
);
/* If the file starts with .LOG, add a time/date at the end and set cursor after
* See http://support.microsoft.com/?kbid=260563
*/
if
(
GetWindowTextW
(
Globals
.
hEdit
,
log
,
sizeof
(
log
)
/
sizeof
(
log
[
0
]))
&&
!
lstrcmp
(
log
,
dotlog
))
{
static
const
WCHAR
lfW
[]
=
{
'\r'
,
'\n'
,
0
};
SendMessage
(
Globals
.
hEdit
,
EM_SETSEL
,
GetWindowTextLength
(
Globals
.
hEdit
),
-
1
);
SendMessage
(
Globals
.
hEdit
,
EM_REPLACESEL
,
TRUE
,
(
LPARAM
)
lfW
);
DIALOG_EditTimeDate
();
SendMessage
(
Globals
.
hEdit
,
EM_REPLACESEL
,
TRUE
,
(
LPARAM
)
lfW
);
}
SetFileName
(
szFileName
);
UpdateWindowCaption
();
...
...
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