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
4c6c9e59
Commit
4c6c9e59
authored
Jul 18, 2007
by
Alexander Nicolaysen Sørnes
Committed by
Alexandre Julliard
Jul 19, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wordpad: Add date/time dialog.
parent
099bfbe1
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
248 additions
and
0 deletions
+248
-0
De.rc
programs/wordpad/De.rc
+15
-0
En.rc
programs/wordpad/En.rc
+15
-0
Fr.rc
programs/wordpad/Fr.rc
+22
-0
Hu.rc
programs/wordpad/Hu.rc
+22
-0
Ko.rc
programs/wordpad/Ko.rc
+15
-0
Nl.rc
programs/wordpad/Nl.rc
+22
-0
No.rc
programs/wordpad/No.rc
+15
-0
Pl.rc
programs/wordpad/Pl.rc
+15
-0
Ru.rc
programs/wordpad/Ru.rc
+22
-0
Tr.rc
programs/wordpad/Tr.rc
+22
-0
resource.h
programs/wordpad/resource.h
+5
-0
wordpad.c
programs/wordpad/wordpad.c
+58
-0
No files found.
programs/wordpad/De.rc
View file @
4c6c9e59
...
...
@@ -58,6 +58,10 @@ BEGIN
MENUITEM "&Formatbar", ID_TOGGLE_FORMATBAR
MENUITEM "&Statusbar", ID_TOGGLE_STATUSBAR
END
POPUP "&Insert"
BEGIN
MENUITEM "&Date and time . . .", ID_DATETIME
END
POPUP "F&ormat"
BEGIN
POPUP "&Hintergrund"
...
...
@@ -74,6 +78,17 @@ BEGIN
END
END
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Date and time"
FONT 10, "MS Sans Serif"
BEGIN
LTEXT "Available formats",0,3,2,100,15
LISTBOX IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
PUSHBUTTON "&OK",IDOK,87,12,40,12
PUSHBUTTON "&Cancel",IDCANCEL,87,26,40,12
END
STRINGTABLE DISCARDABLE
BEGIN
STRING_RICHTEXT_FILES_RTF, "Rich-Text-Format (*.rtf)"
...
...
programs/wordpad/En.rc
View file @
4c6c9e59
...
...
@@ -58,6 +58,10 @@ BEGIN
MENUITEM "&Formatbar", ID_TOGGLE_FORMATBAR
MENUITEM "&Statusbar", ID_TOGGLE_STATUSBAR
END
POPUP "&Insert"
BEGIN
MENUITEM "&Date and time . . .", ID_DATETIME
END
POPUP "F&ormat"
BEGIN
POPUP "&Background"
...
...
@@ -74,6 +78,17 @@ BEGIN
END
END
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Date and time"
FONT 10, "MS Sans Serif"
BEGIN
LTEXT "Available formats",0,3,2,100,15
LISTBOX IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
PUSHBUTTON "&OK",IDOK,87,12,40,12
PUSHBUTTON "&Cancel",IDCANCEL,87,26,40,12
END
STRINGTABLE DISCARDABLE
BEGIN
STRING_RICHTEXT_FILES_RTF, "Rich text format (*.rtf)"
...
...
programs/wordpad/Fr.rc
View file @
4c6c9e59
...
...
@@ -58,6 +58,10 @@ BEGIN
MENUITEM "&Barre de format", ID_TOGGLE_FORMATBAR
MENUITEM "&Barre d'tat", ID_TOGGLE_STATUSBAR
END
POPUP "&Insert"
BEGIN
MENUITEM "&Date and time . . .", ID_DATETIME
END
POPUP "Forma&t"
BEGIN
POPUP "&Fond"
...
...
@@ -74,6 +78,24 @@ BEGIN
END
END
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Date and time"
FONT 10, "MS Sans Serif"
BEGIN
LTEXT "Available formats",0,3,2,100,15
LISTBOX IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
PUSHBUTTON "&OK",IDOK,87,12,40,12
PUSHBUTTON "&Cancel",IDCANCEL,87,26,40,12
END
STRINGTABLE DISCARDABLE
BEGIN
STRING_RICHTEXT_FILES_RTF, "Rich text format (*.rtf)"
STRING_TEXT_FILES_TXT, "Text files (*.txt)"
STRING_ALL_FILES, "All documents (*.*)"
END
STRINGTABLE DISCARDABLE
BEGIN
STRING_DEFAULT_FILENAME, "Document"
...
...
programs/wordpad/Hu.rc
View file @
4c6c9e59
...
...
@@ -58,6 +58,10 @@ BEGIN
MENUITEM "&Formatbar", ID_TOGGLE_FORMATBAR
MENUITEM "&Statusbar", ID_TOGGLE_STATUSBAR
END
POPUP "&Insert"
BEGIN
MENUITEM "&Date and time . . .", ID_DATETIME
END
POPUP "F&ormtum"
BEGIN
POPUP "&Httr"
...
...
@@ -74,6 +78,24 @@ BEGIN
END
END
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Date and time"
FONT 10, "MS Sans Serif"
BEGIN
LTEXT "Available formats",0,3,2,100,15
LISTBOX IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
PUSHBUTTON "&OK",IDOK,87,12,40,12
PUSHBUTTON "&Cancel",IDCANCEL,87,26,40,12
END
STRINGTABLE DISCARDABLE
BEGIN
STRING_RICHTEXT_FILES_RTF, "Rich text format (*.rtf)"
STRING_TEXT_FILES_TXT, "Text files (*.txt)"
STRING_ALL_FILES, "All documents (*.*)"
END
STRINGTABLE DISCARDABLE
BEGIN
STRING_DEFAULT_FILENAME, "Document"
...
...
programs/wordpad/Ko.rc
View file @
4c6c9e59
...
...
@@ -59,6 +59,10 @@ BEGIN
MENUITEM "형식바(&F)", ID_TOGGLE_FORMATBAR
MENUITEM "상태바(&S)", ID_TOGGLE_STATUSBAR
END
POPUP "&Insert"
BEGIN
MENUITEM "&Date and time . . .", ID_DATETIME
END
POPUP "형식(&O)"
BEGIN
POPUP "배경(&B)"
...
...
@@ -75,6 +79,17 @@ BEGIN
END
END
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Date and time"
FONT 10, "MS Sans Serif"
BEGIN
LTEXT "Available formats",0,3,2,100,15
LISTBOX IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
PUSHBUTTON "&OK",IDOK,87,12,40,12
PUSHBUTTON "&Cancel",IDCANCEL,87,26,40,12
END
STRINGTABLE DISCARDABLE
BEGIN
STRING_RICHTEXT_FILES_RTF, "리치 텍스트 파일형식 (*.rtf)"
...
...
programs/wordpad/Nl.rc
View file @
4c6c9e59
...
...
@@ -58,6 +58,10 @@ BEGIN
MENUITEM "&Formatbar", ID_TOGGLE_FORMATBAR
MENUITEM "&Statusbar", ID_TOGGLE_STATUSBAR
END
POPUP "&Insert"
BEGIN
MENUITEM "&Date and time . . .", ID_DATETIME
END
POPUP "&Opmaak"
BEGIN
POPUP "&Achtergrond"
...
...
@@ -74,6 +78,24 @@ BEGIN
END
END
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Date and time"
FONT 10, "MS Sans Serif"
BEGIN
LTEXT "Available formats",0,3,2,100,15
LISTBOX IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
PUSHBUTTON "&OK",IDOK,87,12,40,12
PUSHBUTTON "&Cancel",IDCANCEL,87,26,40,12
END
STRINGTABLE DISCARDABLE
BEGIN
STRING_RICHTEXT_FILES_RTF, "Rich text format (*.rtf)"
STRING_TEXT_FILES_TXT, "Text files (*.txt)"
STRING_ALL_FILES, "All documents (*.*)"
END
STRINGTABLE DISCARDABLE
BEGIN
STRING_DEFAULT_FILENAME, "Document"
...
...
programs/wordpad/No.rc
View file @
4c6c9e59
...
...
@@ -58,6 +58,10 @@ BEGIN
MENUITEM "&Formatlinje", ID_TOGGLE_FORMATBAR
MENUITEM "&Statuslinje", ID_TOGGLE_STATUSBAR
END
POPUP "Sett &inn"
BEGIN
MENUITEM "&Dato og klokkeslett . . .", ID_DATETIME
END
POPUP "F&ormat"
BEGIN
POPUP "&Bakgrunn"
...
...
@@ -74,6 +78,17 @@ BEGIN
END
END
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Dato og klokkeslett"
FONT 10, "MS Sans Serif"
BEGIN
LTEXT "Tilgjengelige formater",0,3,2,100,15
LISTBOX IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
PUSHBUTTON "&OK",IDOK,87,12,40,12
PUSHBUTTON "&Avbryt",IDCANCEL,87,26,40,12
END
STRINGTABLE DISCARDABLE
BEGIN
STRING_RICHTEXT_FILES_RTF, "Rikt tekstformat (*.rtf)"
...
...
programs/wordpad/Pl.rc
View file @
4c6c9e59
...
...
@@ -59,6 +59,10 @@ BEGIN
MENUITEM "&Formatbar", ID_TOGGLE_FORMATBAR
MENUITEM "&Statusbar", ID_TOGGLE_STATUSBAR
END
POPUP "&Insert"
BEGIN
MENUITEM "&Date and time . . .", ID_DATETIME
END
POPUP "F&ormat"
BEGIN
POPUP "&To"
...
...
@@ -75,6 +79,17 @@ BEGIN
END
END
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Date and time"
FONT 10, "MS Sans Serif"
BEGIN
LTEXT "Available formats",0,3,2,100,15
LISTBOX IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
PUSHBUTTON "&OK",IDOK,87,12,40,12
PUSHBUTTON "&Cancel",IDCANCEL,87,26,40,12
END
STRINGTABLE DISCARDABLE
BEGIN
STRING_RICHTEXT_FILES_RTF, "Tekst sformatowany - RTF (*.rtf)"
...
...
programs/wordpad/Ru.rc
View file @
4c6c9e59
...
...
@@ -56,6 +56,10 @@ BEGIN
MENUITEM "&Formatbar", ID_TOGGLE_FORMATBAR
MENUITEM "&Statusbar", ID_TOGGLE_STATUSBAR
END
POPUP "&Insert"
BEGIN
MENUITEM "&Date and time . . .", ID_DATETIME
END
POPUP "&"
BEGIN
POPUP "&"
...
...
@@ -72,6 +76,24 @@ BEGIN
END
END
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Date and time"
FONT 10, "MS Sans Serif"
BEGIN
LTEXT "Available formats",0,3,2,100,15
LISTBOX IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
PUSHBUTTON "&OK",IDOK,87,12,40,12
PUSHBUTTON "&Cancel",IDCANCEL,87,26,40,12
END
STRINGTABLE DISCARDABLE
BEGIN
STRING_RICHTEXT_FILES_RTF, "Rich text format (*.rtf)"
STRING_TEXT_FILES_TXT, "Text files (*.txt)"
STRING_ALL_FILES, "All documents (*.*)"
END
STRINGTABLE DISCARDABLE
BEGIN
STRING_DEFAULT_FILENAME, "Document"
...
...
programs/wordpad/Tr.rc
View file @
4c6c9e59
...
...
@@ -60,6 +60,10 @@ BEGIN
MENUITEM "&Formatbar", ID_TOGGLE_FORMATBAR
MENUITEM "&Statusbar", ID_TOGGLE_STATUSBAR
END
POPUP "&Insert"
BEGIN
MENUITEM "&Date and time . . .", ID_DATETIME
END
POPUP "&Biim"
BEGIN
POPUP "&Arkaplan"
...
...
@@ -76,6 +80,24 @@ BEGIN
END
END
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Date and time"
FONT 10, "MS Sans Serif"
BEGIN
LTEXT "Available formats",0,3,2,100,15
LISTBOX IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
PUSHBUTTON "&OK",IDOK,87,12,40,12
PUSHBUTTON "&Cancel",IDCANCEL,87,26,40,12
END
STRINGTABLE DISCARDABLE
BEGIN
STRING_RICHTEXT_FILES_RTF, "Rich text format (*.rtf)"
STRING_TEXT_FILES_TXT, "Text files (*.txt)"
STRING_ALL_FILES, "All documents (*.*)"
END
STRINGTABLE DISCARDABLE
BEGIN
STRING_DEFAULT_FILENAME, "Document"
...
...
programs/wordpad/resource.h
View file @
4c6c9e59
...
...
@@ -60,12 +60,17 @@
#define BANDID_TOOLBAR 0
#define BANDID_FORMATBAR 1
#define ID_DATETIME 1600
#define IDC_STATUSBAR 2000
#define IDC_EDITOR 2001
#define IDC_TOOLBAR 2002
#define IDC_FORMATBAR 2003
#define IDC_REBAR 2004
#define IDC_COMBO 2005
#define IDC_DATETIME 2006
#define IDD_DATETIME 2100
#define IDB_FORMATBAR 100
...
...
programs/wordpad/wordpad.c
View file @
4c6c9e59
...
...
@@ -434,6 +434,57 @@ static void toggle_toolbar(int bandId)
}
}
BOOL
CALLBACK
datetime_proc
(
HWND
hWnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
switch
(
message
)
{
case
WM_INITDIALOG
:
{
WCHAR
buffer
[
MAX_STRING_LEN
];
SYSTEMTIME
st
;
HWND
hListWnd
=
GetDlgItem
(
hWnd
,
IDC_DATETIME
);
GetLocalTime
(
&
st
);
GetDateFormatW
(
LOCALE_USER_DEFAULT
,
DATE_SHORTDATE
,
&
st
,
0
,
(
LPWSTR
)
&
buffer
,
MAX_STRING_LEN
);
SendMessageW
(
hListWnd
,
LB_ADDSTRING
,
0
,
(
LPARAM
)
&
buffer
);
GetDateFormatW
(
LOCALE_USER_DEFAULT
,
DATE_LONGDATE
,
&
st
,
0
,
(
LPWSTR
)
&
buffer
,
MAX_STRING_LEN
);
SendMessageW
(
hListWnd
,
LB_ADDSTRING
,
0
,
(
LPARAM
)
&
buffer
);
GetTimeFormatW
(
LOCALE_USER_DEFAULT
,
0
,
&
st
,
0
,
(
LPWSTR
)
&
buffer
,
MAX_STRING_LEN
);
SendMessageW
(
hListWnd
,
LB_ADDSTRING
,
0
,
(
LPARAM
)
&
buffer
);
SendMessageW
(
hListWnd
,
LB_SETSEL
,
TRUE
,
0
);
}
break
;
case
WM_COMMAND
:
switch
(
LOWORD
(
wParam
))
{
case
IDOK
:
{
LRESULT
index
;
HWND
hListWnd
=
GetDlgItem
(
hWnd
,
IDC_DATETIME
);
index
=
SendMessageW
(
hListWnd
,
LB_GETCURSEL
,
0
,
0
);
if
(
index
!=
LB_ERR
)
{
WCHAR
buffer
[
MAX_STRING_LEN
];
SendMessageW
(
hListWnd
,
LB_GETTEXT
,
index
,
(
LPARAM
)
&
buffer
);
SendMessageW
(
hEditorWnd
,
EM_REPLACESEL
,
TRUE
,
(
LPARAM
)
&
buffer
);
}
}
/* Fall through */
case
IDCANCEL
:
EndDialog
(
hWnd
,
wParam
);
return
TRUE
;
}
}
return
FALSE
;
}
static
LRESULT
OnCreate
(
HWND
hWnd
,
WPARAM
wParam
,
LPARAM
lParam
)
{
HWND
hToolBarWnd
,
hFormatBarWnd
,
hReBarWnd
;
...
...
@@ -831,6 +882,13 @@ static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam)
update_window
();
break
;
case
ID_DATETIME
:
{
HINSTANCE
hInstance
=
(
HINSTANCE
)
GetWindowLongPtr
(
hWnd
,
GWLP_HINSTANCE
);
DialogBoxW
(
hInstance
,
MAKEINTRESOURCEW
(
IDD_DATETIME
),
hWnd
,
(
DLGPROC
)
datetime_proc
);
break
;
}
default:
SendMessageW
(
hwndEditor
,
WM_COMMAND
,
wParam
,
lParam
);
break
;
...
...
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