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
b836d1f7
Commit
b836d1f7
authored
May 27, 2006
by
Andrew Talbot
Committed by
Alexandre Julliard
May 28, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Write-strings warning fix.
parent
46fc401b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
11 deletions
+17
-11
header.c
dlls/comctl32/tests/header.c
+11
-8
tab.c
dlls/comctl32/tests/tab.c
+6
-3
No files found.
dlls/comctl32/tests/header.c
View file @
b836d1f7
...
...
@@ -220,20 +220,21 @@ static void check_auto_format(void)
{
HDITEMA
hdiCreate
;
HDITEMA
hdiRead
;
static
CHAR
text
[]
=
"Test"
;
ZeroMemory
(
&
hdiCreate
,
sizeof
(
HDITEMA
));
/* Windows implicitly sets some format bits in INSERTITEM */
/* HDF_STRING is automaticaly set and cleared for no text */
hdiCreate
.
mask
=
HDI_TEXT
|
HDI_WIDTH
|
HDI_FORMAT
;
hdiCreate
.
pszText
=
"Test"
;
hdiCreate
.
pszText
=
text
;
hdiCreate
.
cxy
=
100
;
hdiCreate
.
fmt
=
HDF_CENTER
;
addReadDelItem
(
hWndHeader
,
&
hdiCreate
,
HDI_FORMAT
,
&
hdiRead
);
ok
(
hdiRead
.
fmt
==
(
HDF_STRING
|
HDF_CENTER
),
"HDF_STRING not set automatically (fmt=%x)
\n
"
,
hdiRead
.
fmt
);
hdiCreate
.
mask
=
HDI_WIDTH
|
HDI_FORMAT
;
hdiCreate
.
pszText
=
"Test"
;
hdiCreate
.
pszText
=
text
;
hdiCreate
.
fmt
=
HDF_CENTER
|
HDF_STRING
;
addReadDelItem
(
hWndHeader
,
&
hdiCreate
,
HDI_FORMAT
,
&
hdiRead
);
ok
(
hdiRead
.
fmt
==
(
HDF_CENTER
),
"HDF_STRING should be automatically cleared (fmt=%x)
\n
"
,
hdiRead
.
fmt
);
...
...
@@ -273,20 +274,21 @@ static void check_auto_fields(void)
{
HDITEMA
hdiCreate
;
HDITEMA
hdiRead
;
static
CHAR
text
[]
=
"Test"
;
LRESULT
res
;
/* Windows stores the format, width, lparam even if they are not in the item's mask */
ZeroMemory
(
&
hdiCreate
,
sizeof
(
HDITEMA
));
hdiCreate
.
mask
=
HDI_TEXT
;
hdiCreate
.
cxy
=
100
;
hdiCreate
.
pszText
=
"Test"
;
hdiCreate
.
pszText
=
text
;
addReadDelItem
(
hWndHeader
,
&
hdiCreate
,
HDI_WIDTH
,
&
hdiRead
);
TEST_GET_ITEMCOUNT
(
6
);
ok
(
hdiRead
.
cxy
==
hdiCreate
.
cxy
,
"cxy should be automatically set
\n
"
);
ZeroMemory
(
&
hdiCreate
,
sizeof
(
HDITEMA
));
hdiCreate
.
mask
=
HDI_TEXT
;
hdiCreate
.
pszText
=
"Test"
;
hdiCreate
.
pszText
=
text
;
hdiCreate
.
lParam
=
0x12345678
;
addReadDelItem
(
hWndHeader
,
&
hdiCreate
,
HDI_LPARAM
,
&
hdiRead
);
TEST_GET_ITEMCOUNT
(
6
);
...
...
@@ -294,7 +296,7 @@ static void check_auto_fields(void)
ZeroMemory
(
&
hdiCreate
,
sizeof
(
HDITEMA
));
hdiCreate
.
mask
=
HDI_TEXT
;
hdiCreate
.
pszText
=
"Test"
;
hdiCreate
.
pszText
=
text
;
hdiCreate
.
fmt
=
HDF_STRING
|
HDF_CENTER
;
addReadDelItem
(
hWndHeader
,
&
hdiCreate
,
HDI_FORMAT
,
&
hdiRead
);
TEST_GET_ITEMCOUNT
(
6
);
...
...
@@ -303,7 +305,7 @@ static void check_auto_fields(void)
/* others fields are not set */
ZeroMemory
(
&
hdiCreate
,
sizeof
(
HDITEMA
));
hdiCreate
.
mask
=
HDI_TEXT
;
hdiCreate
.
pszText
=
"Test"
;
hdiCreate
.
pszText
=
text
;
hdiCreate
.
hbm
=
CreateBitmap
(
16
,
16
,
1
,
8
,
NULL
);
addReadDelItem
(
hWndHeader
,
&
hdiCreate
,
HDI_BITMAP
,
&
hdiRead
);
TEST_GET_ITEMCOUNT
(
6
);
...
...
@@ -313,7 +315,7 @@ static void check_auto_fields(void)
ZeroMemory
(
&
hdiCreate
,
sizeof
(
HDITEMA
));
hdiCreate
.
mask
=
HDI_IMAGE
;
hdiCreate
.
iImage
=
17
;
hdiCreate
.
pszText
=
"Test"
;
hdiCreate
.
pszText
=
text
;
addReadDelItem
(
hWndHeader
,
&
hdiCreate
,
HDI_TEXT
,
&
hdiRead
);
TEST_GET_ITEMCOUNT
(
6
);
ok
(
hdiRead
.
pszText
==
NULL
,
"pszText shouldn't be automatically set
\n
"
);
...
...
@@ -324,13 +326,14 @@ static void check_auto_fields(void)
static
void
check_mask
()
{
HDITEMA
hdi
;
static
CHAR
text
[]
=
"ABC"
;
LRESULT
ret
;
/* don't create items if the mask is zero */
ZeroMemory
(
&
hdi
,
sizeof
(
hdi
));
hdi
.
mask
=
0
;
hdi
.
cxy
=
200
;
hdi
.
pszText
=
"ABC"
;
hdi
.
pszText
=
text
;
hdi
.
fmt
=
0
;
hdi
.
iOrder
=
0
;
hdi
.
lParam
=
17
;
...
...
dlls/comctl32/tests/tab.c
View file @
b836d1f7
...
...
@@ -57,6 +57,9 @@ create_tabcontrol (DWORD style, DWORD mask)
{
HWND
handle
;
TCITEM
tcNewTab
;
static
char
text1
[]
=
"Tab 1"
,
text2
[]
=
"Wide Tab 2"
,
text3
[]
=
"T 3"
;
handle
=
CreateWindow
(
WC_TABCONTROLA
,
...
...
@@ -71,13 +74,13 @@ create_tabcontrol (DWORD style, DWORD mask)
SendMessage
(
handle
,
WM_SETFONT
,
0
,
(
LPARAM
)
hFont
);
tcNewTab
.
mask
=
mask
;
tcNewTab
.
pszText
=
"Tab 1"
;
tcNewTab
.
pszText
=
text1
;
tcNewTab
.
iImage
=
0
;
SendMessage
(
handle
,
TCM_INSERTITEM
,
0
,
(
LPARAM
)
&
tcNewTab
);
tcNewTab
.
pszText
=
"Wide Tab 2"
;
tcNewTab
.
pszText
=
text2
;
tcNewTab
.
iImage
=
1
;
SendMessage
(
handle
,
TCM_INSERTITEM
,
1
,
(
LPARAM
)
&
tcNewTab
);
tcNewTab
.
pszText
=
"T 3"
;
tcNewTab
.
pszText
=
text3
;
tcNewTab
.
iImage
=
2
;
SendMessage
(
handle
,
TCM_INSERTITEM
,
2
,
(
LPARAM
)
&
tcNewTab
);
...
...
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