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
5bc0dfc2
Commit
5bc0dfc2
authored
Aug 23, 2007
by
Alexander Nicolaysen Sørnes
Committed by
Alexandre Julliard
Sep 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wordpad: Add context menu.
parent
05e6a4e6
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
164 additions
and
0 deletions
+164
-0
De.rc
programs/wordpad/De.rc
+13
-0
En.rc
programs/wordpad/En.rc
+13
-0
Fr.rc
programs/wordpad/Fr.rc
+13
-0
Hu.rc
programs/wordpad/Hu.rc
+13
-0
Ko.rc
programs/wordpad/Ko.rc
+13
-0
Nl.rc
programs/wordpad/Nl.rc
+13
-0
No.rc
programs/wordpad/No.rc
+13
-0
Pl.rc
programs/wordpad/Pl.rc
+13
-0
Ru.rc
programs/wordpad/Ru.rc
+14
-0
Tr.rc
programs/wordpad/Tr.rc
+13
-0
resource.h
programs/wordpad/resource.h
+2
-0
wordpad.c
programs/wordpad/wordpad.c
+31
-0
No files found.
programs/wordpad/De.rc
View file @
5bc0dfc2
...
@@ -81,6 +81,19 @@ BEGIN
...
@@ -81,6 +81,19 @@ BEGIN
END
END
END
END
IDM_POPUP MENU DISCARDABLE
BEGIN
POPUP ""
BEGIN
MENUITEM "Aus&schneiden", ID_EDIT_CUT
MENUITEM "&Kopieren", ID_EDIT_COPY
MENUITEM "&Einfgen", ID_EDIT_PASTE
MENUITEM SEPARATOR
MENUITEM "&Bullet points" ID_BULLET
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
END
END
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Date and time"
CAPTION "Date and time"
...
...
programs/wordpad/En.rc
View file @
5bc0dfc2
...
@@ -81,6 +81,19 @@ BEGIN
...
@@ -81,6 +81,19 @@ BEGIN
END
END
END
END
IDM_POPUP MENU DISCARDABLE
BEGIN
POPUP ""
BEGIN
MENUITEM "Cu&t", ID_EDIT_CUT
MENUITEM "&Copy", ID_EDIT_COPY
MENUITEM "&Paste", ID_EDIT_PASTE
MENUITEM SEPARATOR
MENUITEM "&Bullet points" ID_BULLET
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
END
END
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Date and time"
CAPTION "Date and time"
...
...
programs/wordpad/Fr.rc
View file @
5bc0dfc2
...
@@ -81,6 +81,19 @@ BEGIN
...
@@ -81,6 +81,19 @@ BEGIN
END
END
END
END
IDM_POPUP MENU DISCARDABLE
BEGIN
POPUP ""
BEGIN
MENUITEM "&Couper", ID_EDIT_CUT
MENUITEM "Co&pier", ID_EDIT_COPY
MENUITEM "C&oller", ID_EDIT_PASTE
MENUITEM SEPARATOR
MENUITEM "&Bullet points" ID_BULLET
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
END
END
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Date and time"
CAPTION "Date and time"
...
...
programs/wordpad/Hu.rc
View file @
5bc0dfc2
...
@@ -81,6 +81,19 @@ BEGIN
...
@@ -81,6 +81,19 @@ BEGIN
END
END
END
END
IDM_POPUP MENU DISCARDABLE
BEGIN
POPUP ""
BEGIN
MENUITEM "Kiv&gs\tCtrl+X", ID_EDIT_CUT
MENUITEM "M&sols\tCtrl+C", ID_EDIT_COPY
MENUITEM "&Beilleszts\tCtrl+V", ID_EDIT_PASTE
MENUITEM SEPARATOR
MENUITEM "&Bullet points" ID_BULLET
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
END
END
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Date and time"
CAPTION "Date and time"
...
...
programs/wordpad/Ko.rc
View file @
5bc0dfc2
...
@@ -82,6 +82,19 @@ BEGIN
...
@@ -82,6 +82,19 @@ BEGIN
END
END
END
END
IDM_POPUP MENU DISCARDABLE
BEGIN
POPUP ""
BEGIN
MENUITEM "잘라내기(&T)", ID_EDIT_CUT
MENUITEM "복사(&C)", ID_EDIT_COPY
MENUITEM "붙여넣기(&P)", ID_EDIT_PASTE
MENUITEM SEPARATOR
MENUITEM "&Bullet points" ID_BULLET
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
END
END
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "날짜와 시간"
CAPTION "날짜와 시간"
...
...
programs/wordpad/Nl.rc
View file @
5bc0dfc2
...
@@ -81,6 +81,19 @@ BEGIN
...
@@ -81,6 +81,19 @@ BEGIN
END
END
END
END
IDM_POPUP MENU DISCARDABLE
BEGIN
POPUP ""
BEGIN
MENUITEM "K&nippen", ID_EDIT_CUT
MENUITEM "&Kopieren", ID_EDIT_COPY
MENUITEM "&Plakken", ID_EDIT_PASTE
MENUITEM SEPARATOR
MENUITEM "&Bullet points" ID_BULLET
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
END
END
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Date and time"
CAPTION "Date and time"
...
...
programs/wordpad/No.rc
View file @
5bc0dfc2
...
@@ -81,6 +81,19 @@ BEGIN
...
@@ -81,6 +81,19 @@ BEGIN
END
END
END
END
IDM_POPUP MENU DISCARDABLE
BEGIN
POPUP ""
BEGIN
MENUITEM "Klipp u&t" ID_EDIT_CUT
MENUITEM "&Kopier" ID_EDIT_COPY
MENUITEM "&Lim inn" ID_EDIT_PASTE
MENUITEM SEPARATOR
MENUITEM "&Punktmerking" ID_BULLET
MENUITEM "&Avsnitt . . ." ID_PARAFORMAT
END
END
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Dato og klokkeslett"
CAPTION "Dato og klokkeslett"
...
...
programs/wordpad/Pl.rc
View file @
5bc0dfc2
...
@@ -82,6 +82,19 @@ BEGIN
...
@@ -82,6 +82,19 @@ BEGIN
END
END
END
END
IDM_POPUP MENU DISCARDABLE
BEGIN
POPUP ""
BEGIN
MENUITEM "Wy&tnij", ID_EDIT_CUT
MENUITEM "&Kopiuj", ID_EDIT_COPY
MENUITEM "Wkl&ej", ID_EDIT_PASTE
MENUITEM SEPARATOR
MENUITEM "&Bullet points" ID_BULLET
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
END
END
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Date and time"
CAPTION "Date and time"
...
...
programs/wordpad/Ru.rc
View file @
5bc0dfc2
...
@@ -40,6 +40,7 @@ BEGIN
...
@@ -40,6 +40,7 @@ BEGIN
MENUITEM SEPARATOR
MENUITEM SEPARATOR
MENUITEM "&\tCtrl+X", ID_EDIT_CUT
MENUITEM "&\tCtrl+X", ID_EDIT_CUT
MENUITEM "&\tCtrl+C", ID_EDIT_COPY
MENUITEM "&\tCtrl+C", ID_EDIT_COPY
MENUITEM "&Paste\tCtrl+V", ID_EDIT_PASTE
MENUITEM SEPARATOR
MENUITEM SEPARATOR
MENUITEM "&Find . . .\tCrtl+F", ID_FIND
MENUITEM "&Find . . .\tCrtl+F", ID_FIND
MENUITEM "Find &next\tF3", ID_FIND_NEXT
MENUITEM "Find &next\tF3", ID_FIND_NEXT
...
@@ -79,6 +80,19 @@ BEGIN
...
@@ -79,6 +80,19 @@ BEGIN
END
END
END
END
IDM_POPUP MENU DISCARDABLE
BEGIN
POPUP ""
BEGIN
MENUITEM "&\tCtrl+X", ID_EDIT_CUT
MENUITEM "&\tCtrl+C", ID_EDIT_COPY
MENUITEM "&Paste", ID_EDIT_PASTE
MENUITEM SEPARATOR
MENUITEM "&Bullet points" ID_BULLET
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
END
END
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Date and time"
CAPTION "Date and time"
...
...
programs/wordpad/Tr.rc
View file @
5bc0dfc2
...
@@ -84,6 +84,19 @@ BEGIN
...
@@ -84,6 +84,19 @@ BEGIN
END
END
END
END
IDM_POPUP MENU DISCARDABLE
BEGIN
POPUP ""
BEGIN
MENUITEM "Ke&s", ID_EDIT_CUT
MENUITEM "&Kopyala", ID_EDIT_COPY
MENUITEM "Ya&ptr", ID_EDIT_PASTE
MENUITEM SEPARATOR
MENUITEM "&Bullet points" ID_BULLET
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
END
END
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Date and time"
CAPTION "Date and time"
...
...
programs/wordpad/resource.h
View file @
5bc0dfc2
...
@@ -104,6 +104,8 @@
...
@@ -104,6 +104,8 @@
#define IDD_PARAFORMAT 2102
#define IDD_PARAFORMAT 2102
#define IDD_TABSTOPS 2103
#define IDD_TABSTOPS 2103
#define IDM_POPUP 2200
#define IDB_TOOLBAR 100
#define IDB_TOOLBAR 100
#define IDB_FORMATBAR 101
#define IDB_FORMATBAR 101
...
...
programs/wordpad/wordpad.c
View file @
5bc0dfc2
...
@@ -61,6 +61,7 @@ static const WCHAR var_pagemargin[] = {'P','a','g','e','M','a','r','g','i','n',0
...
@@ -61,6 +61,7 @@ static const WCHAR var_pagemargin[] = {'P','a','g','e','M','a','r','g','i','n',0
static
HWND
hMainWnd
;
static
HWND
hMainWnd
;
static
HWND
hEditorWnd
;
static
HWND
hEditorWnd
;
static
HWND
hFindWnd
;
static
HWND
hFindWnd
;
static
HMENU
hPopupMenu
;
static
UINT
ID_FINDMSGSTRING
;
static
UINT
ID_FINDMSGSTRING
;
...
@@ -1657,6 +1658,29 @@ static INT_PTR CALLBACK tabstops_proc(HWND hWnd, UINT message, WPARAM wParam, LP
...
@@ -1657,6 +1658,29 @@ static INT_PTR CALLBACK tabstops_proc(HWND hWnd, UINT message, WPARAM wParam, LP
return
FALSE
;
return
FALSE
;
}
}
static
int
context_menu
(
LPARAM
lParam
)
{
int
x
=
(
int
)(
short
)
LOWORD
(
lParam
);
int
y
=
(
int
)(
short
)
HIWORD
(
lParam
);
HMENU
hPop
=
GetSubMenu
(
hPopupMenu
,
0
);
if
(
x
==
-
1
)
{
int
from
=
0
,
to
=
0
;
POINTL
pt
;
SendMessageW
(
hEditorWnd
,
EM_GETSEL
,
(
WPARAM
)
&
from
,
(
LPARAM
)
&
to
);
SendMessageW
(
hEditorWnd
,
EM_POSFROMCHAR
,
(
WPARAM
)
&
pt
,
(
LPARAM
)
to
);
ClientToScreen
(
hEditorWnd
,
(
POINT
*
)
&
pt
);
x
=
pt
.
x
;
y
=
pt
.
y
;
}
TrackPopupMenu
(
hPop
,
TPM_LEFTALIGN
|
TPM_TOPALIGN
|
TPM_RIGHTBUTTON
,
x
,
y
,
0
,
hMainWnd
,
0
);
return
0
;
}
static
LRESULT
OnCreate
(
HWND
hWnd
,
WPARAM
wParam
,
LPARAM
lParam
)
static
LRESULT
OnCreate
(
HWND
hWnd
,
WPARAM
wParam
,
LPARAM
lParam
)
{
{
HWND
hToolBarWnd
,
hFormatBarWnd
,
hReBarWnd
;
HWND
hToolBarWnd
,
hFormatBarWnd
,
hReBarWnd
;
...
@@ -2330,6 +2354,12 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara
...
@@ -2330,6 +2354,12 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara
case
WM_SIZE
:
case
WM_SIZE
:
return
OnSize
(
hWnd
,
wParam
,
lParam
);
return
OnSize
(
hWnd
,
wParam
,
lParam
);
case
WM_CONTEXTMENU
:
if
((
HWND
)
wParam
==
hEditorWnd
)
return
context_menu
(
lParam
);
else
return
DefWindowProcW
(
hWnd
,
msg
,
wParam
,
lParam
);
case
WM_DROPFILES
:
case
WM_DROPFILES
:
{
{
WCHAR
file
[
MAX_PATH
];
WCHAR
file
[
MAX_PATH
];
...
@@ -2381,6 +2411,7 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hOldInstance, LPSTR szCmdPar
...
@@ -2381,6 +2411,7 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hOldInstance, LPSTR szCmdPar
set_caption
(
NULL
);
set_caption
(
NULL
);
set_bar_states
();
set_bar_states
();
hPopupMenu
=
LoadMenuW
(
hInstance
,
MAKEINTRESOURCEW
(
IDM_POPUP
));
HandleCommandLine
(
GetCommandLineW
());
HandleCommandLine
(
GetCommandLineW
());
...
...
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