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
21727c41
Commit
21727c41
authored
May 17, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 17, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: When created with TCS_VERTICAL, TCS_MULTILINE is set automatically.
parent
ace41e92
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
5 deletions
+38
-5
tab.c
dlls/comctl32/tab.c
+7
-5
tab.c
dlls/comctl32/tests/tab.c
+31
-0
No files found.
dlls/comctl32/tab.c
View file @
21727c41
...
...
@@ -3020,7 +3020,7 @@ static LRESULT TAB_Create (HWND hwnd, LPARAM lParam)
TEXTMETRICW
fontMetrics
;
HDC
hdc
;
HFONT
hOldFont
;
DWORD
dwS
tyle
;
DWORD
s
tyle
;
infoPtr
=
Alloc
(
sizeof
(
TAB_INFO
));
...
...
@@ -3054,11 +3054,13 @@ static LRESULT TAB_Create (HWND hwnd, LPARAM lParam)
/* The tab control always has the WS_CLIPSIBLINGS style. Even
if you don't specify it in CreateWindow. This is necessary in
order for paint to work correctly. This follows windows behaviour. */
dwStyle
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
SetWindowLongW
(
hwnd
,
GWL_STYLE
,
dwStyle
|
WS_CLIPSIBLINGS
);
style
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
if
(
style
&
TCS_VERTICAL
)
style
|=
TCS_MULTILINE
;
style
|=
WS_CLIPSIBLINGS
;
SetWindowLongW
(
hwnd
,
GWL_STYLE
,
style
);
infoPtr
->
dwStyle
=
dwStyle
|
WS_CLIPSIBLINGS
;
infoPtr
->
exStyle
=
(
dwS
tyle
&
TCS_FLATBUTTONS
)
?
TCS_EX_FLATSEPARATORS
:
0
;
infoPtr
->
dwStyle
=
style
;
infoPtr
->
exStyle
=
(
s
tyle
&
TCS_FLATBUTTONS
)
?
TCS_EX_FLATSEPARATORS
:
0
;
if
(
infoPtr
->
dwStyle
&
TCS_TOOLTIPS
)
{
/* Create tooltip control */
...
...
dlls/comctl32/tests/tab.c
View file @
21727c41
...
...
@@ -1428,6 +1428,36 @@ static void test_WM_CONTEXTMENU(void)
DestroyWindow
(
hTab
);
}
struct
tabcreate_style
{
DWORD
style
;
DWORD
act_style
;
};
static
const
struct
tabcreate_style
create_styles
[]
=
{
{
WS_CHILD
|
TCS_BOTTOM
|
TCS_VERTICAL
,
WS_CHILD
|
WS_CLIPSIBLINGS
|
TCS_BOTTOM
|
TCS_VERTICAL
|
TCS_MULTILINE
},
{
WS_CHILD
|
TCS_VERTICAL
,
WS_CHILD
|
WS_CLIPSIBLINGS
|
TCS_VERTICAL
|
TCS_MULTILINE
},
{
0
}
};
static
void
test_create
(
void
)
{
const
struct
tabcreate_style
*
ptr
=
create_styles
;
DWORD
style
;
HWND
hTab
;
while
(
ptr
->
style
)
{
hTab
=
CreateWindowA
(
WC_TABCONTROLA
,
"TestTab"
,
ptr
->
style
,
10
,
10
,
300
,
100
,
parent_wnd
,
NULL
,
NULL
,
0
);
style
=
GetWindowLongA
(
hTab
,
GWL_STYLE
);
ok
(
style
==
ptr
->
act_style
,
"expected style 0x%08x, got style 0x%08x
\n
"
,
ptr
->
act_style
,
style
);
DestroyWindow
(
hTab
);
ptr
++
;
}
}
START_TEST
(
tab
)
{
LOGFONTA
logfont
;
...
...
@@ -1465,6 +1495,7 @@ START_TEST(tab)
test_TCM_SETITEMEXTRA
();
test_TCS_OWNERDRAWFIXED
();
test_WM_CONTEXTMENU
();
test_create
();
DestroyWindow
(
parent_wnd
);
}
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