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
fc2ce677
Commit
fc2ce677
authored
Feb 02, 2006
by
Kevin Koltzau
Committed by
Alexandre Julliard
Feb 02, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Handle context menu.
parent
1c9e1f34
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
editor.c
dlls/riched20/editor.c
+26
-0
No files found.
dlls/riched20/editor.c
View file @
fc2ce677
...
...
@@ -852,6 +852,29 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey)
return
FALSE
;
}
static
void
ME_ShowContextMenu
(
ME_TextEditor
*
editor
,
int
x
,
int
y
)
{
CHARRANGE
selrange
;
HMENU
menu
;
int
seltype
=
0
;
if
(
!
editor
->
lpOleCallback
)
return
;
ME_GetSelection
(
editor
,
(
int
*
)
&
selrange
.
cpMin
,
(
int
*
)
&
selrange
.
cpMax
);
if
(
selrange
.
cpMin
==
selrange
.
cpMax
)
seltype
|=
SEL_EMPTY
;
else
{
/* FIXME: Handle objects */
seltype
|=
SEL_TEXT
;
if
(
selrange
.
cpMax
-
selrange
.
cpMin
>
1
)
seltype
|=
SEL_MULTICHAR
;
}
if
(
SUCCEEDED
(
IRichEditOleCallback_GetContextMenu
(
editor
->
lpOleCallback
,
seltype
,
NULL
,
&
selrange
,
&
menu
)))
{
TrackPopupMenu
(
menu
,
TPM_LEFTALIGN
|
TPM_RIGHTBUTTON
,
x
,
y
,
0
,
GetParent
(
editor
->
hWnd
),
NULL
);
DestroyMenu
(
menu
);
}
}
ME_TextEditor
*
ME_MakeEditor
(
HWND
hWnd
)
{
ME_TextEditor
*
ed
=
ALLOC_OBJ
(
ME_TextEditor
);
...
...
@@ -1842,6 +1865,9 @@ LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
case
WM_LBUTTONDBLCLK
:
ME_SelectWord
(
editor
);
break
;
case
WM_CONTEXTMENU
:
ME_ShowContextMenu
(
editor
,
(
short
)
LOWORD
(
lParam
),
(
short
)
HIWORD
(
lParam
));
break
;
case
WM_PAINT
:
if
(
editor
->
bRedraw
)
{
...
...
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