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
b1f61804
Commit
b1f61804
authored
Jun 28, 2005
by
Phil Krylov
Committed by
Alexandre Julliard
Jun 28, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented EM_GETTEXTLENGTHEX RichEdit message.
parent
68db49f2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
2 deletions
+36
-2
caret.c
dlls/riched20/caret.c
+32
-0
editor.c
dlls/riched20/editor.c
+3
-2
editor.h
dlls/riched20/editor.h
+1
-0
No files found.
dlls/riched20/caret.c
View file @
b1f61804
...
...
@@ -41,6 +41,38 @@ int ME_GetTextLength(ME_TextEditor *editor)
return
ME_CharOfsFromRunOfs
(
editor
,
ME_FindItemBack
(
editor
->
pBuffer
->
pLast
,
diRun
),
0
);
}
int
ME_GetTextLengthEx
(
ME_TextEditor
*
editor
,
GETTEXTLENGTHEX
*
how
)
{
int
length
;
if
(
how
->
flags
&
GTL_PRECISE
&&
how
->
flags
&
GTL_CLOSE
)
return
E_INVALIDARG
;
if
(
how
->
flags
&
GTL_NUMCHARS
&&
how
->
flags
&
GTL_NUMBYTES
)
return
E_INVALIDARG
;
length
=
ME_GetTextLength
(
editor
);
if
(
how
->
flags
&
GTL_USECRLF
)
length
+=
editor
->
nParagraphs
;
if
(
how
->
flags
&
GTL_NUMBYTES
)
{
CPINFO
cpinfo
;
if
(
how
->
codepage
==
1200
)
return
length
*
2
;
if
(
how
->
flags
&
GTL_PRECISE
)
FIXME
(
"GTL_PRECISE flag unsupported. Using GTL_CLOSE
\n
"
);
if
(
GetCPInfo
(
how
->
codepage
,
&
cpinfo
))
return
length
*
cpinfo
.
MaxCharSize
;
ERR
(
"Invalid codepage %u
\n
"
,
how
->
codepage
);
return
E_INVALIDARG
;
}
return
length
;
}
void
ME_SetSelection
(
ME_TextEditor
*
editor
,
int
from
,
int
to
)
{
if
(
from
==
0
&&
to
==
-
1
)
...
...
dlls/riched20/editor.c
View file @
b1f61804
...
...
@@ -65,7 +65,7 @@
- EM_GETSCROLLPOS 3.0
! - EM_GETTHUMB
- EM_GETTEXTEX 2.0
- EM_GETTEXTLENGTHEX
+ EM_GETTEXTLENGTHEX (GTL_PRECISE unimplemented)
- EM_GETTEXTMODE 2.0
? + EM_GETTEXTRANGE (ANSI&Unicode)
- EM_GETTYPOGRAPHYOPTIONS 3.0
...
...
@@ -846,7 +846,6 @@ LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
UNSUPPORTED_MSG
(
EM_GETREDONAME
)
UNSUPPORTED_MSG
(
EM_GETSCROLLPOS
)
UNSUPPORTED_MSG
(
EM_GETTEXTEX
)
UNSUPPORTED_MSG
(
EM_GETTEXTLENGTHEX
)
UNSUPPORTED_MSG
(
EM_GETTEXTMODE
)
UNSUPPORTED_MSG
(
EM_GETTYPOGRAPHYOPTIONS
)
UNSUPPORTED_MSG
(
EM_GETUNDONAME
)
...
...
@@ -1175,6 +1174,8 @@ LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
}
case
WM_GETTEXTLENGTH
:
return
ME_GetTextLength
(
editor
);
case
EM_GETTEXTLENGTHEX
:
return
ME_GetTextLengthEx
(
editor
,
(
GETTEXTLENGTHEX
*
)
wParam
);
case
WM_GETTEXT
:
{
TEXTRANGEW
tr
;
/* W and A differ only by rng->lpstrText */
...
...
dlls/riched20/editor.h
View file @
b1f61804
...
...
@@ -160,6 +160,7 @@ void ME_SendSelChange(ME_TextEditor *editor);
void
ME_InsertGraphicsFromCursor
(
ME_TextEditor
*
editor
,
int
nCursor
);
void
ME_InternalDeleteText
(
ME_TextEditor
*
editor
,
int
nOfs
,
int
nChars
);
int
ME_GetTextLength
(
ME_TextEditor
*
editor
);
int
ME_GetTextLengthEx
(
ME_TextEditor
*
editor
,
GETTEXTLENGTHEX
*
how
);
ME_Style
*
ME_GetSelectionInsertStyle
(
ME_TextEditor
*
editor
);
BOOL
ME_UpdateSelection
(
ME_TextEditor
*
editor
,
ME_Cursor
*
pTempCursor
);
...
...
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