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
8e92e536
Commit
8e92e536
authored
May 26, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user: Added fast 32->16 mapping for WM_GETTEXT, WM_SETTEXT and similar messages.
parent
1d2f9004
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
35 deletions
+12
-35
winproc.c
dlls/user/winproc.c
+12
-35
No files found.
dlls/user/winproc.c
View file @
8e92e536
...
...
@@ -964,16 +964,6 @@ static INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
*
plparam
=
MAKELPARAM
(
(
HWND16
)
*
plparam
,
(
WORD
)
msg32
-
WM_CTLCOLORMSGBOX
);
return
0
;
case
WM_GETTEXT
:
case
WM_ASKCBFORMATNAME
:
{
LPARAM
*
str
;
/* store LPARAM, then *pwparam16 char space */
*
pwparam16
=
(
WPARAM16
)
min
(
wParam32
,
0xff80
);
/* Must be < 64K */
if
(
!
(
str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
*
pwparam16
+
sizeof
(
LPARAM
))))
return
-
1
;
*
str
++
=
*
plparam
;
/* Store the previous lParam */
*
plparam
=
MapLS
(
str
);
}
return
1
;
case
WM_MENUSELECT
:
if
(
HIWORD
(
wParam32
)
&
MF_POPUP
)
{
...
...
@@ -993,14 +983,6 @@ static INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
*
plparam
=
MAKELPARAM
(
(
HWND16
)
*
plparam
,
HIWORD
(
wParam32
));
/* else nothing to do */
return
0
;
case
WM_NOTIFY
:
*
plparam
=
MapLS
(
(
NMHDR
*
)
*
plparam
);
/* NMHDR is already 32-bit */
return
1
;
case
WM_SETTEXT
:
case
WM_WININICHANGE
:
case
WM_DEVMODECHANGE
:
*
plparam
=
MapLS
(
(
LPSTR
)
*
plparam
);
return
1
;
case
WM_ACTIVATEAPP
:
if
(
*
plparam
)
*
plparam
=
HTASK_16
(
(
HANDLE
)
*
plparam
);
return
0
;
...
...
@@ -1062,9 +1044,6 @@ static void WINPROC_UnmapMsg32ATo16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM
case
CB_SELECTSTRING
:
case
CB_DIR
:
case
CB_GETLBTEXT
:
case
WM_SETTEXT
:
case
WM_WININICHANGE
:
case
WM_DEVMODECHANGE
:
UnMapLS
(
(
SEGPTR
)
lParam16
);
break
;
case
LB_SETTABSTOPS
:
...
...
@@ -1106,20 +1085,6 @@ static void WINPROC_UnmapMsg32ATo16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM
if
(
lParam
)
*
((
PUINT
)(
lParam
))
=
HIWORD
(
*
result
);
/* FIXME: substract 1? */
break
;
case
WM_GETTEXT
:
case
WM_ASKCBFORMATNAME
:
{
LPSTR
str
=
MapSL
(
lParam16
);
UnMapLS
(
lParam16
);
lParam16
=
*
((
LPARAM
*
)
str
-
1
);
lstrcpynA
(
(
LPSTR
)
lParam16
,
str
,
wParam16
);
HeapFree
(
GetProcessHeap
(),
0
,
(
LPARAM
*
)
str
-
1
);
}
break
;
case
WM_NOTIFY
:
UnMapLS
(
lParam16
);
break
;
}
}
...
...
@@ -2222,6 +2187,18 @@ LRESULT WINPROC_CallProc32ATo16( winproc_callback16_t callback, HWND hwnd, UINT
*
result
=
0
;
}
break
;
case
WM_GETTEXT
:
case
WM_ASKCBFORMATNAME
:
wParam
=
min
(
wParam
,
0xff80
);
/* Must be < 64K */
/* fall through */
case
WM_NOTIFY
:
case
WM_SETTEXT
:
case
WM_WININICHANGE
:
case
WM_DEVMODECHANGE
:
lParam
=
MapLS
(
(
void
*
)
lParam
);
ret
=
callback
(
HWND_16
(
hwnd
),
msg
,
wParam
,
lParam
,
result
,
arg
);
UnMapLS
(
lParam
);
break
;
case
WM_DDE_INITIATE
:
case
WM_DDE_TERMINATE
:
case
WM_DDE_UNADVISE
:
...
...
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