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
6f3b4944
Commit
6f3b4944
authored
Dec 27, 2009
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 28, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Remove some explicit LPARAM/WPARAM casts.
parent
425cc7e0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
27 deletions
+23
-27
button.c
dlls/user32/button.c
+1
-1
combo.c
dlls/user32/combo.c
+15
-19
edit.c
dlls/user32/edit.c
+4
-4
mdi.c
dlls/user32/mdi.c
+2
-2
message.c
dlls/user32/message.c
+1
-1
No files found.
dlls/user32/button.c
View file @
6f3b4944
...
...
@@ -742,7 +742,7 @@ static void BUTTON_DrawLabel(HWND hwnd, HDC hdc, UINT dtFlags, const RECT *rc)
lpOutputProc
=
BUTTON_DrawTextCallback
;
if
(
!
(
text
=
get_button_text
(
hwnd
)))
return
;
lp
=
(
LPARAM
)
text
;
wp
=
(
WPARAM
)
dtFlags
;
wp
=
dtFlags
;
break
;
case
BS_ICON
:
...
...
dlls/user32/combo.c
View file @
6f3b4944
...
...
@@ -717,7 +717,7 @@ static void CBPaintText(
if
(
(
pText
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
size
+
1
)
*
sizeof
(
WCHAR
)))
)
{
/* size from LB_GETTEXTLEN may be too large, from LB_GETTEXT is accurate */
size
=
SendMessageW
(
lphc
->
hWndLBox
,
LB_GETTEXT
,
(
WPARAM
)
id
,
(
LPARAM
)
pText
);
size
=
SendMessageW
(
lphc
->
hWndLBox
,
LB_GETTEXT
,
id
,
(
LPARAM
)
pText
);
pText
[
size
]
=
'\0'
;
/* just in case */
}
else
return
;
}
...
...
@@ -730,7 +730,7 @@ static void CBPaintText(
static
const
WCHAR
empty_stringW
[]
=
{
0
};
if
(
CB_HASSTRINGS
(
lphc
)
)
SetWindowTextW
(
lphc
->
hWndEdit
,
pText
?
pText
:
empty_stringW
);
if
(
lphc
->
wState
&
CBF_FOCUSED
)
SendMessageW
(
lphc
->
hWndEdit
,
EM_SETSEL
,
0
,
(
LPARAM
)(
-
1
)
);
SendMessageW
(
lphc
->
hWndEdit
,
EM_SETSEL
,
0
,
-
1
);
}
else
/* paint text field ourselves */
{
...
...
@@ -776,8 +776,7 @@ static void CBPaintText(
dis
.
itemState
=
itemState
;
dis
.
hDC
=
hdc
;
dis
.
rcItem
=
rectEdit
;
dis
.
itemData
=
SendMessageW
(
lphc
->
hWndLBox
,
LB_GETITEMDATA
,
(
WPARAM
)
id
,
0
);
dis
.
itemData
=
SendMessageW
(
lphc
->
hWndLBox
,
LB_GETITEMDATA
,
id
,
0
);
/*
* Clip the DC and have the parent draw the item.
...
...
@@ -975,16 +974,15 @@ static INT CBUpdateLBox( LPHEADCOMBO lphc, BOOL bSelect )
if
(
pText
)
{
GetWindowTextW
(
lphc
->
hWndEdit
,
pText
,
length
+
1
);
idx
=
SendMessageW
(
lphc
->
hWndLBox
,
LB_FINDSTRING
,
(
WPARAM
)(
-
1
),
(
LPARAM
)
pText
);
idx
=
SendMessageW
(
lphc
->
hWndLBox
,
LB_FINDSTRING
,
-
1
,
(
LPARAM
)
pText
);
HeapFree
(
GetProcessHeap
(),
0
,
pText
);
}
SendMessageW
(
lphc
->
hWndLBox
,
LB_SETCURSEL
,
(
WPARAM
)(
bSelect
?
idx
:
-
1
)
,
0
);
SendMessageW
(
lphc
->
hWndLBox
,
LB_SETCURSEL
,
bSelect
?
idx
:
-
1
,
0
);
/* probably superfluous but Windows sends this too */
SendMessageW
(
lphc
->
hWndLBox
,
LB_SETCARETINDEX
,
(
WPARAM
)(
idx
<
0
?
0
:
idx
)
,
0
);
SendMessageW
(
lphc
->
hWndLBox
,
LB_SETTOPINDEX
,
(
WPARAM
)(
idx
<
0
?
0
:
idx
)
,
0
);
SendMessageW
(
lphc
->
hWndLBox
,
LB_SETCARETINDEX
,
idx
<
0
?
0
:
idx
,
0
);
SendMessageW
(
lphc
->
hWndLBox
,
LB_SETTOPINDEX
,
idx
<
0
?
0
:
idx
,
0
);
return
idx
;
}
...
...
@@ -1004,13 +1002,12 @@ static void CBUpdateEdit( LPHEADCOMBO lphc , INT index )
if
(
index
>=
0
)
/* got an entry */
{
length
=
SendMessageW
(
lphc
->
hWndLBox
,
LB_GETTEXTLEN
,
(
WPARAM
)
index
,
0
);
length
=
SendMessageW
(
lphc
->
hWndLBox
,
LB_GETTEXTLEN
,
index
,
0
);
if
(
length
!=
LB_ERR
)
{
if
(
(
pText
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
length
+
1
)
*
sizeof
(
WCHAR
)))
)
{
SendMessageW
(
lphc
->
hWndLBox
,
LB_GETTEXT
,
(
WPARAM
)
index
,
(
LPARAM
)
pText
);
SendMessageW
(
lphc
->
hWndLBox
,
LB_GETTEXT
,
index
,
(
LPARAM
)
pText
);
}
}
}
...
...
@@ -1023,7 +1020,7 @@ static void CBUpdateEdit( LPHEADCOMBO lphc , INT index )
}
if
(
lphc
->
wState
&
CBF_FOCUSED
)
SendMessageW
(
lphc
->
hWndEdit
,
EM_SETSEL
,
0
,
(
LPARAM
)(
-
1
)
);
SendMessageW
(
lphc
->
hWndEdit
,
EM_SETSEL
,
0
,
-
1
);
HeapFree
(
GetProcessHeap
(),
0
,
pText
);
}
...
...
@@ -1061,7 +1058,7 @@ static void CBDropDown( LPHEADCOMBO lphc )
lphc
->
droppedIndex
=
SendMessageW
(
lphc
->
hWndLBox
,
LB_GETCURSEL
,
0
,
0
);
SendMessageW
(
lphc
->
hWndLBox
,
LB_SETTOPINDEX
,
(
WPARAM
)(
lphc
->
droppedIndex
==
LB_ERR
?
0
:
lphc
->
droppedIndex
),
0
);
lphc
->
droppedIndex
==
LB_ERR
?
0
:
lphc
->
droppedIndex
,
0
);
SendMessageW
(
lphc
->
hWndLBox
,
LB_CARETON
,
0
,
0
);
}
...
...
@@ -1356,7 +1353,7 @@ static LRESULT COMBO_Command( LPHEADCOMBO lphc, WPARAM wParam, HWND hWnd )
lphc
->
wState
|=
CBF_NOLBSELECT
;
CBUpdateEdit
(
lphc
,
index
);
/* select text in edit, as Windows does */
SendMessageW
(
lphc
->
hWndEdit
,
EM_SETSEL
,
0
,
(
LPARAM
)(
-
1
)
);
SendMessageW
(
lphc
->
hWndEdit
,
EM_SETSEL
,
0
,
-
1
);
}
else
{
...
...
@@ -1655,8 +1652,7 @@ static LRESULT COMBO_SetItemHeight( LPHEADCOMBO lphc, INT index, INT height )
}
}
else
if
(
CB_OWNERDRAWN
(
lphc
)
)
/* set listbox item height */
lRet
=
SendMessageW
(
lphc
->
hWndLBox
,
LB_SETITEMHEIGHT
,
(
WPARAM
)
index
,
(
LPARAM
)
height
);
lRet
=
SendMessageW
(
lphc
->
hWndLBox
,
LB_SETITEMHEIGHT
,
index
,
height
);
return
lRet
;
}
...
...
@@ -1665,8 +1661,8 @@ static LRESULT COMBO_SetItemHeight( LPHEADCOMBO lphc, INT index, INT height )
*/
static
LRESULT
COMBO_SelectString
(
LPHEADCOMBO
lphc
,
INT
start
,
LPARAM
pText
,
BOOL
unicode
)
{
INT
index
=
unicode
?
SendMessageW
(
lphc
->
hWndLBox
,
LB_SELECTSTRING
,
(
WPARAM
)
start
,
pText
)
:
SendMessageA
(
lphc
->
hWndLBox
,
LB_SELECTSTRING
,
(
WPARAM
)
start
,
pText
);
INT
index
=
unicode
?
SendMessageW
(
lphc
->
hWndLBox
,
LB_SELECTSTRING
,
start
,
pText
)
:
SendMessageA
(
lphc
->
hWndLBox
,
LB_SELECTSTRING
,
start
,
pText
);
if
(
index
>=
0
)
{
if
(
lphc
->
wState
&
CBF_EDIT
)
...
...
dlls/user32/edit.c
View file @
6f3b4944
...
...
@@ -3195,14 +3195,14 @@ static BOOL EDIT_CheckCombo(EDITSTATE *es, UINT msg, INT key)
nEUI
=
2
;
}
SendMessageW
(
hLBox
,
WM_KEYDOWN
,
(
WPARAM
)
key
,
0
);
SendMessageW
(
hLBox
,
WM_KEYDOWN
,
key
,
0
);
break
;
case
WM_SYSKEYDOWN
:
/* Handle Alt+up/down arrows */
if
(
nEUI
)
SendMessageW
(
hCombo
,
CB_SHOWDROPDOWN
,
bDropped
?
FALSE
:
TRUE
,
0
);
else
SendMessageW
(
hLBox
,
WM_KEYDOWN
,
(
WPARAM
)
VK_F4
,
0
);
SendMessageW
(
hLBox
,
WM_KEYDOWN
,
VK_F4
,
0
);
break
;
}
...
...
@@ -3326,7 +3326,7 @@ static LRESULT EDIT_WM_KeyDown(EDITSTATE *es, INT key)
HWND
hwDefCtrl
=
GetDlgItem
(
es
->
hwndParent
,
LOWORD
(
dw
));
if
(
hwDefCtrl
)
{
SendMessageW
(
es
->
hwndParent
,
WM_NEXTDLGCTL
,
(
WPARAM
)
hwDefCtrl
,
(
LPARAM
)
TRUE
);
SendMessageW
(
es
->
hwndParent
,
WM_NEXTDLGCTL
,
(
WPARAM
)
hwDefCtrl
,
TRUE
);
PostMessageW
(
hwDefCtrl
,
WM_KEYDOWN
,
VK_RETURN
,
0
);
}
}
...
...
@@ -3797,7 +3797,7 @@ static LRESULT EDIT_WM_SysKeyDown(EDITSTATE *es, INT key, DWORD key_data)
if
(
EDIT_CheckCombo
(
es
,
WM_SYSKEYDOWN
,
key
))
return
0
;
}
return
DefWindowProcW
(
es
->
hwndSelf
,
WM_SYSKEYDOWN
,
(
WPARAM
)
key
,
(
LPARAM
)
key_data
);
return
DefWindowProcW
(
es
->
hwndSelf
,
WM_SYSKEYDOWN
,
key
,
key_data
);
}
...
...
dlls/user32/mdi.c
View file @
6f3b4944
...
...
@@ -1583,7 +1583,7 @@ LRESULT WINAPI DefMDIChildProcW( HWND hwnd, UINT message,
case
WM_SYSCHAR
:
if
(
wParam
==
'-'
)
{
SendMessageW
(
hwnd
,
WM_SYSCOMMAND
,
(
WPARAM
)
SC_KEYMENU
,
(
DWORD
)
VK_SPACE
);
SendMessageW
(
hwnd
,
WM_SYSCOMMAND
,
SC_KEYMENU
,
VK_SPACE
);
return
0
;
}
break
;
...
...
@@ -1686,7 +1686,7 @@ BOOL WINAPI TranslateMDISysAccel( HWND hwndClient, LPMSG msg )
return
0
;
}
TRACE
(
"wParam = %04lx
\n
"
,
wParam
);
SendMessageW
(
ci
->
hwndActiveChild
,
WM_SYSCOMMAND
,
wParam
,
(
LPARAM
)
msg
->
wParam
);
SendMessageW
(
ci
->
hwndActiveChild
,
WM_SYSCOMMAND
,
wParam
,
msg
->
wParam
);
return
1
;
}
}
...
...
dlls/user32/message.c
View file @
6f3b4944
...
...
@@ -1750,7 +1750,7 @@ static BOOL process_keyboard_message( MSG *msg, UINT hw_id, HWND hwnd_filter,
{
/* Handle VK_APPS key by posting a WM_CONTEXTMENU message */
if
(
msg
->
wParam
==
VK_APPS
&&
!
MENU_IsMenuActive
())
PostMessageW
(
msg
->
hwnd
,
WM_CONTEXTMENU
,
(
WPARAM
)
msg
->
hwnd
,
(
LPARAM
)
-
1
);
PostMessageW
(
msg
->
hwnd
,
WM_CONTEXTMENU
,
(
WPARAM
)
msg
->
hwnd
,
-
1
);
}
}
...
...
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