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
c5dda71c
Commit
c5dda71c
authored
Mar 23, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 23, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/static: Allow setting NULL text.
parent
6e638d82
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
9 deletions
+22
-9
static.c
dlls/user32/static.c
+6
-9
static.c
dlls/user32/tests/static.c
+16
-0
No files found.
dlls/user32/static.c
View file @
c5dda71c
...
...
@@ -464,15 +464,12 @@ LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
case
WM_SETTEXT
:
if
(
hasTextStyle
(
full_style
))
{
if
(
HIWORD
(
lParam
))
{
if
(
unicode
)
lResult
=
DefWindowProcW
(
hwnd
,
uMsg
,
wParam
,
lParam
);
else
lResult
=
DefWindowProcA
(
hwnd
,
uMsg
,
wParam
,
lParam
);
STATIC_TryPaintFcn
(
hwnd
,
full_style
);
}
}
if
(
unicode
)
lResult
=
DefWindowProcW
(
hwnd
,
uMsg
,
wParam
,
lParam
);
else
lResult
=
DefWindowProcA
(
hwnd
,
uMsg
,
wParam
,
lParam
);
STATIC_TryPaintFcn
(
hwnd
,
full_style
);
}
break
;
case
WM_SETFONT
:
...
...
dlls/user32/tests/static.c
View file @
c5dda71c
...
...
@@ -117,6 +117,21 @@ static void test_updates(int style, int flags)
DestroyWindow
(
hStatic
);
}
static
void
test_set_text
(
void
)
{
HWND
hStatic
=
build_static
(
SS_SIMPLE
);
char
buffA
[
10
];
GetWindowTextA
(
hStatic
,
buffA
,
sizeof
(
buffA
));
ok
(
!
strcmp
(
buffA
,
"Test"
),
"got wrong text %s
\n
"
,
buffA
);
SetWindowTextA
(
hStatic
,
NULL
);
GetWindowTextA
(
hStatic
,
buffA
,
sizeof
(
buffA
));
ok
(
buffA
[
0
]
==
0
,
"got wrong text %s
\n
"
,
buffA
);
DestroyWindow
(
hStatic
);
}
START_TEST
(
static
)
{
static
const
char
szClassName
[]
=
"testclass"
;
...
...
@@ -148,6 +163,7 @@ START_TEST(static)
test_updates
(
SS_WHITERECT
,
TODO_COUNT
);
test_updates
(
SS_ETCHEDHORZ
,
TODO_COUNT
);
test_updates
(
SS_ETCHEDVERT
,
TODO_COUNT
);
test_set_text
();
DestroyWindow
(
hMainWnd
);
}
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