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
06d42261
Commit
06d42261
authored
May 08, 1999
by
Francois Boisvert
Committed by
Alexandre Julliard
May 08, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implementation of WM_GETTEXT and WM_GETTEXTLENGTH in tooltips.
parent
ad7e9c4c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
1 deletion
+55
-1
tooltips.c
dlls/comctl32/tooltips.c
+55
-1
No files found.
dlls/comctl32/tooltips.c
View file @
06d42261
...
...
@@ -1858,7 +1858,7 @@ TOOLTIPS_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
nResult
=
(
INT
)
SendMessageA
(
GetParent
(
hwnd
),
WM_NOTIFYFORMAT
,
(
WPARAM
)
hwnd
,
(
LPARAM
)
NF_QUERY
);
if
(
nResult
==
NFR_ANSI
)
FIXM
E
(
tooltips
,
" -- WM_NOTIFYFORMAT returns: NFR_ANSI
\n
"
);
TRAC
E
(
tooltips
,
" -- WM_NOTIFYFORMAT returns: NFR_ANSI
\n
"
);
else
if
(
nResult
==
NFR_UNICODE
)
FIXME
(
tooltips
,
" -- WM_NOTIFYFORMAT returns: NFR_UNICODE
\n
"
);
else
...
...
@@ -2011,7 +2011,54 @@ TOOLTIPS_SetFont (HWND hwnd, WPARAM wParam, LPARAM lParam)
return
0
;
}
/******************************************************************
* TOOLTIPS_OnWMGetTextLength
*
* This function is called when the tooltip receive a
* WM_GETTEXTLENGTH message.
* wParam : not used
* lParam : not used
*
* returns the length, in characters, of the tip text
******************************************************************/
static
LRESULT
TOOLTIPS_OnWMGetTextLength
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
{
TOOLTIPS_INFO
*
infoPtr
=
TOOLTIPS_GetInfoPtr
(
hwnd
);
return
lstrlenW
(
infoPtr
->
szTipText
);
}
/******************************************************************
* TOOLTIPS_OnWMGetText
*
* This function is called when the tooltip receive a
* WM_GETTEXT message.
* wParam : specifies the maximum number of characters to be copied
* lParam : is the pointer to the buffer that will receive
* the tip text
*
* returns the number of characters copied
******************************************************************/
static
LRESULT
TOOLTIPS_OnWMGetText
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
{
TOOLTIPS_INFO
*
infoPtr
=
TOOLTIPS_GetInfoPtr
(
hwnd
);
INT
length
;
if
(
!
infoPtr
||
!
(
infoPtr
->
szTipText
))
return
0
;
length
=
lstrlenW
(
infoPtr
->
szTipText
);
/* When wParam is smaller than the lenght of the tip text
copy wParam characters of the tip text and return wParam */
if
(
wParam
<
length
)
{
lstrcpynWtoA
((
LPSTR
)
lParam
,
infoPtr
->
szTipText
,(
UINT
)
wParam
);
return
wParam
;
}
lstrcpyWtoA
((
LPSTR
)
lParam
,
infoPtr
->
szTipText
);
return
length
;
}
static
LRESULT
TOOLTIPS_Timer
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
...
...
@@ -2252,6 +2299,13 @@ TOOLTIPS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case
WM_GETFONT
:
return
TOOLTIPS_GetFont
(
hwnd
,
wParam
,
lParam
);
case
WM_GETTEXT
:
return
TOOLTIPS_OnWMGetText
(
hwnd
,
wParam
,
lParam
);
case
WM_GETTEXTLENGTH
:
return
TOOLTIPS_OnWMGetTextLength
(
hwnd
,
wParam
,
lParam
);
case
WM_LBUTTONDOWN
:
case
WM_LBUTTONUP
:
case
WM_MBUTTONDOWN
:
...
...
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