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
92e4e633
Commit
92e4e633
authored
Dec 27, 2009
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 28, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Remove some superfluous casts around SendMessage().
parent
f897a912
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
21 deletions
+21
-21
comboex.c
dlls/comctl32/tests/comboex.c
+4
-4
header.c
dlls/comctl32/tests/header.c
+9
-9
listview.c
dlls/comctl32/tests/listview.c
+1
-1
monthcal.c
dlls/comctl32/tests/monthcal.c
+1
-1
rebar.c
dlls/comctl32/tests/rebar.c
+1
-1
treeview.c
dlls/comctl32/tests/treeview.c
+5
-5
No files found.
dlls/comctl32/tests/comboex.c
View file @
92e4e633
...
...
@@ -54,7 +54,7 @@ static LONG addItem(HWND cbex, int idx, LPTSTR text) {
cbexItem
.
iItem
=
idx
;
cbexItem
.
pszText
=
text
;
cbexItem
.
cchTextMax
=
0
;
return
(
LONG
)
SendMessage
(
cbex
,
CBEM_INSERTITEM
,
0
,
(
LPARAM
)
&
cbexItem
);
return
SendMessage
(
cbex
,
CBEM_INSERTITEM
,
0
,
(
LPARAM
)
&
cbexItem
);
}
static
LONG
setItem
(
HWND
cbex
,
int
idx
,
LPTSTR
text
)
{
...
...
@@ -64,11 +64,11 @@ static LONG setItem(HWND cbex, int idx, LPTSTR text) {
cbexItem
.
iItem
=
idx
;
cbexItem
.
pszText
=
text
;
cbexItem
.
cchTextMax
=
0
;
return
(
LONG
)
SendMessage
(
cbex
,
CBEM_SETITEM
,
0
,
(
LPARAM
)
&
cbexItem
);
return
SendMessage
(
cbex
,
CBEM_SETITEM
,
0
,
(
LPARAM
)
&
cbexItem
);
}
static
LONG
delItem
(
HWND
cbex
,
int
idx
)
{
return
(
LONG
)
SendMessage
(
cbex
,
CBEM_DELETEITEM
,
(
LPARAM
)
idx
,
0
);
return
SendMessage
(
cbex
,
CBEM_DELETEITEM
,
idx
,
0
);
}
static
LONG
getItem
(
HWND
cbex
,
int
idx
,
COMBOBOXEXITEM
*
cbItem
)
{
...
...
@@ -77,7 +77,7 @@ static LONG getItem(HWND cbex, int idx, COMBOBOXEXITEM *cbItem) {
cbItem
->
pszText
=
textBuffer
;
cbItem
->
iItem
=
idx
;
cbItem
->
cchTextMax
=
100
;
return
(
LONG
)
SendMessage
(
cbex
,
CBEM_GETITEM
,
0
,
(
LPARAM
)
cbItem
);
return
SendMessage
(
cbex
,
CBEM_GETITEM
,
0
,
(
LPARAM
)
cbItem
);
}
static
LRESULT
WINAPI
editbox_subclass_proc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
...
...
dlls/comctl32/tests/header.c
View file @
92e4e633
...
...
@@ -244,7 +244,7 @@ static LONG addItem(HWND hdex, int idx, LPSTR text)
hdItem
.
cxy
=
100
;
hdItem
.
pszText
=
text
;
hdItem
.
cchTextMax
=
0
;
return
(
LONG
)
SendMessage
(
hdex
,
HDM_INSERTITEMA
,
(
WPARAM
)
idx
,
(
LPARAM
)
&
hdItem
);
return
SendMessage
(
hdex
,
HDM_INSERTITEMA
,
idx
,
(
LPARAM
)
&
hdItem
);
}
static
LONG
setItem
(
HWND
hdex
,
int
idx
,
LPSTR
text
,
BOOL
fCheckNotifies
)
...
...
@@ -259,7 +259,7 @@ static LONG setItem(HWND hdex, int idx, LPSTR text, BOOL fCheckNotifies)
expect_notify
(
HDN_ITEMCHANGINGA
,
FALSE
,
&
hdexItem
);
expect_notify
(
HDN_ITEMCHANGEDA
,
FALSE
,
&
hdexItem
);
}
ret
=
(
LONG
)
SendMessage
(
hdex
,
HDM_SETITEMA
,
(
WPARAM
)
idx
,
(
LPARAM
)
&
hdexItem
);
ret
=
SendMessage
(
hdex
,
HDM_SETITEMA
,
idx
,
(
LPARAM
)
&
hdexItem
);
if
(
fCheckNotifies
)
ok
(
notifies_received
(),
"setItem(): not all expected notifies were received
\n
"
);
return
ret
;
...
...
@@ -279,19 +279,19 @@ static LONG setItemUnicodeNotify(HWND hdex, int idx, LPSTR text, LPWSTR wText)
expect_notify
(
HDN_ITEMCHANGINGW
,
TRUE
,
(
HDITEMA
*
)
&
hdexNotify
);
expect_notify
(
HDN_ITEMCHANGEDW
,
TRUE
,
(
HDITEMA
*
)
&
hdexNotify
);
ret
=
(
LONG
)
SendMessage
(
hdex
,
HDM_SETITEMA
,
(
WPARAM
)
idx
,
(
LPARAM
)
&
hdexItem
);
ret
=
SendMessage
(
hdex
,
HDM_SETITEMA
,
idx
,
(
LPARAM
)
&
hdexItem
);
ok
(
notifies_received
(),
"setItemUnicodeNotify(): not all expected notifies were received
\n
"
);
return
ret
;
}
static
LONG
delItem
(
HWND
hdex
,
int
idx
)
{
return
(
LONG
)
SendMessage
(
hdex
,
HDM_DELETEITEM
,
(
WPARAM
)
idx
,
0
);
return
SendMessage
(
hdex
,
HDM_DELETEITEM
,
idx
,
0
);
}
static
LONG
getItemCount
(
HWND
hdex
)
{
return
(
LONG
)
SendMessage
(
hdex
,
HDM_GETITEMCOUNT
,
0
,
0
);
return
SendMessage
(
hdex
,
HDM_GETITEMCOUNT
,
0
,
0
);
}
static
LONG
getItem
(
HWND
hdex
,
int
idx
,
LPSTR
textBuffer
)
...
...
@@ -300,7 +300,7 @@ static LONG getItem(HWND hdex, int idx, LPSTR textBuffer)
hdItem
.
mask
=
HDI_TEXT
;
hdItem
.
pszText
=
textBuffer
;
hdItem
.
cchTextMax
=
MAX_CHARS
;
return
(
LONG
)
SendMessage
(
hdex
,
HDM_GETITEMA
,
(
WPARAM
)
idx
,
(
LPARAM
)
&
hdItem
);
return
SendMessage
(
hdex
,
HDM_GETITEMA
,
idx
,
(
LPARAM
)
&
hdItem
);
}
static
void
addReadDelItem
(
HWND
hdex
,
HDITEMA
*
phdiCreate
,
int
maskRead
,
HDITEMA
*
phdiRead
)
...
...
@@ -748,10 +748,10 @@ static void test_header_control (void)
TEST_GET_ITEM
(
i
,
4
);
TEST_GET_ITEMCOUNT
(
6
);
}
SendMessageA
(
hWndHeader
,
HDM_SETUNICODEFORMAT
,
(
WPARAM
)
TRUE
,
0
);
SendMessageA
(
hWndHeader
,
HDM_SETUNICODEFORMAT
,
TRUE
,
0
);
setItemUnicodeNotify
(
hWndHeader
,
3
,
pszUniTestA
,
pszUniTestW
);
SendMessageA
(
hWndHeader
,
WM_NOTIFYFORMAT
,
(
WPARAM
)
hHeaderParentWnd
,
(
LPARAM
)
NF_REQUERY
);
SendMessageA
(
hWndHeader
,
WM_NOTIFYFORMAT
,
(
WPARAM
)
hHeaderParentWnd
,
NF_REQUERY
);
setItem
(
hWndHeader
,
3
,
str_items
[
4
],
TRUE
);
dont_expect_notify
(
HDN_GETDISPINFOA
);
...
...
dlls/comctl32/tests/listview.c
View file @
92e4e633
...
...
@@ -1553,7 +1553,7 @@ static void test_icon_spacing(void)
hwnd
=
create_listview_control
(
LVS_ICON
);
ok
(
hwnd
!=
NULL
,
"failed to create a listview window
\n
"
);
r
=
SendMessage
(
hwnd
,
WM_NOTIFYFORMAT
,
(
WPARAM
)
hwndparent
,
(
LPARAM
)
NF_REQUERY
);
r
=
SendMessage
(
hwnd
,
WM_NOTIFYFORMAT
,
(
WPARAM
)
hwndparent
,
NF_REQUERY
);
expect
(
NFR_ANSI
,
r
);
/* reset the icon spacing to defaults */
...
...
dlls/comctl32/tests/monthcal.c
View file @
92e4e633
...
...
@@ -857,7 +857,7 @@ static void test_monthcal_firstDay(void)
/* checking for the values that actually will be stored as */
/* current first day when we set a new value */
for
(
i
=
-
5
;
i
<
12
;
i
++
){
res
=
SendMessage
(
hwnd
,
MCM_SETFIRSTDAYOFWEEK
,
0
,
(
LPARAM
)
i
);
res
=
SendMessage
(
hwnd
,
MCM_SETFIRSTDAYOFWEEK
,
0
,
i
);
expect
(
prev
,
res
);
res
=
SendMessage
(
hwnd
,
MCM_GETFIRSTDAYOFWEEK
,
0
,
0
);
prev
=
res
;
...
...
dlls/comctl32/tests/rebar.c
View file @
92e4e633
...
...
@@ -87,7 +87,7 @@ static HWND build_toolbar(int nr, HWND hParent)
int
i
;
ok
(
hToolbar
!=
NULL
,
"Toolbar creation problem
\n
"
);
ok
(
SendMessage
(
hToolbar
,
TB_BUTTONSTRUCTSIZE
,
(
WPARAM
)
sizeof
(
TBBUTTON
),
0
)
==
0
,
"TB_BUTTONSTRUCTSIZE failed
\n
"
);
ok
(
SendMessage
(
hToolbar
,
TB_BUTTONSTRUCTSIZE
,
sizeof
(
TBBUTTON
),
0
)
==
0
,
"TB_BUTTONSTRUCTSIZE failed
\n
"
);
ok
(
SendMessage
(
hToolbar
,
TB_AUTOSIZE
,
0
,
0
)
==
0
,
"TB_AUTOSIZE failed
\n
"
);
ok
(
SendMessage
(
hToolbar
,
WM_SETFONT
,
(
WPARAM
)
GetStockObject
(
SYSTEM_FONT
),
0
)
==
1
,
"WM_SETFONT
\n
"
);
...
...
dlls/comctl32/tests/treeview.c
View file @
92e4e633
...
...
@@ -520,12 +520,12 @@ static void test_get_set_bkcolor(void)
ok
(
crColor
==
-
1
,
"Default background color reported as 0x%.8x
\n
"
,
crColor
);
/* Test for black background */
SendMessage
(
hTree
,
TVM_SETBKCOLOR
,
0
,
(
LPARAM
)
RGB
(
0
,
0
,
0
)
);
SendMessage
(
hTree
,
TVM_SETBKCOLOR
,
0
,
RGB
(
0
,
0
,
0
)
);
crColor
=
(
COLORREF
)
SendMessage
(
hTree
,
TVM_GETBKCOLOR
,
0
,
0
);
ok
(
crColor
==
RGB
(
0
,
0
,
0
),
"Black background color reported as 0x%.8x
\n
"
,
crColor
);
/* Test for white background */
SendMessage
(
hTree
,
TVM_SETBKCOLOR
,
0
,
(
LPARAM
)
RGB
(
255
,
255
,
255
)
);
SendMessage
(
hTree
,
TVM_SETBKCOLOR
,
0
,
RGB
(
255
,
255
,
255
)
);
crColor
=
(
COLORREF
)
SendMessage
(
hTree
,
TVM_GETBKCOLOR
,
0
,
0
);
ok
(
crColor
==
RGB
(
255
,
255
,
255
),
"White background color reported as 0x%.8x
\n
"
,
crColor
);
...
...
@@ -718,12 +718,12 @@ static void test_get_set_textcolor(void)
ok
(
crColor
==
-
1
,
"Default text color reported as 0x%.8x
\n
"
,
crColor
);
/* Test for black text */
SendMessage
(
hTree
,
TVM_SETTEXTCOLOR
,
0
,
(
LPARAM
)
RGB
(
0
,
0
,
0
)
);
SendMessage
(
hTree
,
TVM_SETTEXTCOLOR
,
0
,
RGB
(
0
,
0
,
0
)
);
crColor
=
(
COLORREF
)
SendMessage
(
hTree
,
TVM_GETTEXTCOLOR
,
0
,
0
);
ok
(
crColor
==
RGB
(
0
,
0
,
0
),
"Black text color reported as 0x%.8x
\n
"
,
crColor
);
/* Test for white text */
SendMessage
(
hTree
,
TVM_SETTEXTCOLOR
,
0
,
(
LPARAM
)
RGB
(
255
,
255
,
255
)
);
SendMessage
(
hTree
,
TVM_SETTEXTCOLOR
,
0
,
RGB
(
255
,
255
,
255
)
);
crColor
=
(
COLORREF
)
SendMessage
(
hTree
,
TVM_GETTEXTCOLOR
,
0
,
0
);
ok
(
crColor
==
RGB
(
255
,
255
,
255
),
"White text color reported as 0x%.8x
\n
"
,
crColor
);
...
...
@@ -785,7 +785,7 @@ static void test_get_set_unicodeformat(void)
ok
(
bNewSetting
==
0
,
"ANSI setting did not work.
\n
"
);
/* Revert to original setting */
SendMessage
(
hTree
,
TVM_SETUNICODEFORMAT
,
(
LPARAM
)
bPreviousSetting
,
0
);
SendMessage
(
hTree
,
TVM_SETUNICODEFORMAT
,
bPreviousSetting
,
0
);
ok_sequence
(
MsgSequences
,
TREEVIEW_SEQ_INDEX
,
test_get_set_unicodeformat_seq
,
"test get set unicode format"
,
FALSE
);
...
...
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