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
92b0ad98
Commit
92b0ad98
authored
Mar 23, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tab: Implement TCM_[G,S]ETEXTENDEDSTYLE and TCS_EX_FLATSEPARATORS style.
parent
b896b920
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
12 deletions
+43
-12
tab.c
dlls/comctl32/tab.c
+41
-8
tab.c
dlls/comctl32/tests/tab.c
+2
-4
No files found.
dlls/comctl32/tab.c
View file @
92b0ad98
...
...
@@ -40,7 +40,6 @@
* TCIF_RTLREADING
*
* Extended Styles:
* TCS_EX_FLATSEPARATORS
* TCS_EX_REGISTERDROP
*
* States:
...
...
@@ -54,8 +53,6 @@
*
* Messages:
* TCM_DESELECTALL
* TCM_GETEXTENDEDSTYLE
* TCM_SETEXTENDEDSTYLE
*
* Macros:
* TabCtrl_AdjustRect
...
...
@@ -126,6 +123,9 @@ typedef struct
BOOL
bUnicode
;
/* Unicode control? */
HWND
hwndUpDown
;
/* Updown control used for scrolling */
INT
cbInfo
;
/* Number of bytes of caller supplied info per tab */
DWORD
exStyle
;
/* Extended style used, currently:
TCS_EX_FLATSEPARATORS, TCS_EX_REGISTERDROP */
}
TAB_INFO
;
/******************************************************************************
...
...
@@ -1947,7 +1947,7 @@ static void TAB_DrawItem(const TAB_INFO *infoPtr, HDC hdc, INT iItem)
r
=
itemRect
;
/* Separators between flat buttons */
if
(
lStyle
&
TCS_FLATBUTTONS
)
if
(
(
lStyle
&
TCS_FLATBUTTONS
)
&&
(
infoPtr
->
exStyle
&
TCS_EX_FLATSEPARATORS
)
)
{
r1
=
r
;
r1
.
right
+=
(
FLAT_BTN_SPACINGX
-
2
);
...
...
@@ -2978,6 +2978,8 @@ static LRESULT TAB_Create (HWND hwnd, LPARAM lParam)
dwStyle
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
SetWindowLongW
(
hwnd
,
GWL_STYLE
,
dwStyle
|
WS_CLIPSIBLINGS
);
infoPtr
->
exStyle
=
(
dwStyle
&
TCS_FLATBUTTONS
)
?
TCS_EX_FLATSEPARATORS
:
0
;
if
(
dwStyle
&
TCS_TOOLTIPS
)
{
/* Create tooltip control */
infoPtr
->
hwndToolTip
=
...
...
@@ -3129,6 +3131,39 @@ static LRESULT TAB_RemoveImage (TAB_INFO *infoPtr, INT image)
return
0
;
}
static
LRESULT
TAB_SetExtendedStyle
(
TAB_INFO
*
infoPtr
,
DWORD
exMask
,
DWORD
exStyle
)
{
DWORD
prevstyle
=
infoPtr
->
exStyle
;
/* zero mask means all styles */
if
(
exMask
==
0
)
exMask
=
~
0
;
if
(
exMask
&
TCS_EX_REGISTERDROP
)
{
FIXME
(
"TCS_EX_REGISTERDROP style unimplemented
\n
"
);
exMask
&=
~
TCS_EX_REGISTERDROP
;
exStyle
&=
~
TCS_EX_REGISTERDROP
;
}
if
(
exMask
&
TCS_EX_FLATSEPARATORS
)
{
if
((
prevstyle
^
exStyle
)
&
TCS_EX_FLATSEPARATORS
)
{
infoPtr
->
exStyle
^=
TCS_EX_FLATSEPARATORS
;
TAB_InvalidateTabArea
(
infoPtr
);
}
}
return
prevstyle
;
}
static
inline
LRESULT
TAB_GetExtendedStyle
(
TAB_INFO
*
infoPtr
)
{
return
infoPtr
->
exStyle
;
}
static
LRESULT
WINAPI
TAB_WindowProc
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
...
...
@@ -3226,12 +3261,10 @@ TAB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return
0
;
case
TCM_GETEXTENDEDSTYLE
:
FIXME
(
"Unimplemented msg TCM_GETEXTENDEDSTYLE
\n
"
);
return
0
;
return
TAB_GetExtendedStyle
(
infoPtr
);
case
TCM_SETEXTENDEDSTYLE
:
FIXME
(
"Unimplemented msg TCM_SETEXTENDEDSTYLE
\n
"
);
return
0
;
return
TAB_SetExtendedStyle
(
infoPtr
,
wParam
,
lParam
);
case
WM_GETFONT
:
return
TAB_GetFont
(
infoPtr
);
...
...
dlls/comctl32/tests/tab.c
View file @
92b0ad98
...
...
@@ -768,12 +768,10 @@ static void test_getters_setters(HWND parent_wnd, INT nTabs)
/* Testing Flat Separators */
extendedStyle
=
SendMessage
(
hTab
,
TCM_GETEXTENDEDSTYLE
,
0
,
0
);
prevExtendedStyle
=
SendMessage
(
hTab
,
TCM_SETEXTENDEDSTYLE
,
0
,
TCS_EX_FLATSEPARATORS
);
expect
(
extendedStyle
,
prevExtendedStyle
);
expect
(
extendedStyle
,
prevExtendedStyle
);
extendedStyle
=
SendMessage
(
hTab
,
TCM_GETEXTENDEDSTYLE
,
0
,
0
);
todo_wine
{
expect
(
TCS_EX_FLATSEPARATORS
,
extendedStyle
);
}
expect
(
TCS_EX_FLATSEPARATORS
,
extendedStyle
);
/* Testing Register Drop */
prevExtendedStyle
=
SendMessage
(
hTab
,
TCM_SETEXTENDEDSTYLE
,
0
,
TCS_EX_REGISTERDROP
);
...
...
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