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
fc09e709
Commit
fc09e709
authored
Apr 01, 1999
by
Francis Beaudet
Committed by
Alexandre Julliard
Apr 01, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented TCM_ADJUSTRECT.
parent
3496b43b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
9 deletions
+66
-9
tab.c
dlls/comctl32/tab.c
+66
-9
No files found.
dlls/comctl32/tab.c
View file @
fc09e709
...
...
@@ -27,6 +27,10 @@
#define ROUND_CORNER_SIZE 2
#define FOCUS_RECT_HOFFSET 2
#define FOCUS_RECT_VOFFSET 1
#define DISPLAY_AREA_PADDINGX 5
#define DISPLAY_AREA_PADDINGY 5
#define CONTROL_BORDER_SIZEX 2
#define CONTROL_BORDER_SIZEY 2
#define TAB_GetInfoPtr(hwnd) ((TAB_INFO *)GetWindowLongA(hwnd,0))
...
...
@@ -423,14 +427,67 @@ TAB_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam)
return
0
;
}
static
LRESULT
TAB_AdjustRect
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
/******************************************************************************
* TAB_AdjustRect
*
* Calculates the tab control's display area given the windows rectangle or
* the window rectangle given the requested display rectangle.
*/
static
LRESULT
TAB_AdjustRect
(
HWND
hwnd
,
WPARAM
fLarger
,
LPRECT
prc
)
{
TAB_INFO
*
infoPtr
=
TAB_GetInfoPtr
(
hwnd
);
if
(
fLarger
)
{
/*
* Go from display rectangle
*/
/*
* Add the height of the tabs.
*/
if
(
GetWindowLongA
(
hwnd
,
GWL_STYLE
)
&
TCS_BOTTOM
)
prc
->
bottom
+=
infoPtr
->
tabHeight
;
else
prc
->
top
-=
infoPtr
->
tabHeight
;
/*
* Inflate the rectangle for the padding
*/
InflateRect
(
prc
,
DISPLAY_AREA_PADDINGX
,
DISPLAY_AREA_PADDINGY
);
/*
* Inflate for the border
*/
InflateRect
(
prc
,
CONTROL_BORDER_SIZEX
,
CONTROL_BORDER_SIZEX
);
}
else
{
/*
* Go from window rectangle.
*/
/*
* Deflate the rectangle for the border
*/
InflateRect
(
prc
,
-
CONTROL_BORDER_SIZEX
,
-
CONTROL_BORDER_SIZEX
);
/*
* Deflate the rectangle for the padding
*/
InflateRect
(
prc
,
-
DISPLAY_AREA_PADDINGX
,
-
DISPLAY_AREA_PADDINGY
);
/*
* Remove the height of the tabs.
*/
if
(
GetWindowLongA
(
hwnd
,
GWL_STYLE
)
&
TCS_BOTTOM
)
prc
->
bottom
-=
infoPtr
->
tabHeight
;
else
prc
->
top
+=
infoPtr
->
tabHeight
;
if
(
wParam
==
TRUE
)
{
FIXME
(
tab
,
"Should set display rectangle
\n
"
);
}
else
{
FIXME
(
tab
,
"Should set window rectangle
\n
"
);
}
return
0
;
...
...
@@ -1302,9 +1359,9 @@ TAB_Size (HWND hwnd, WPARAM wParam, LPARAM lParam)
SetWindowPos (hwnd, 0, parent_rect.left, parent_rect.top,
cx, cy, uPosFlags | SWP_NOZORDER);
} else {
*/
} else {
FIXME (tab,"WM_SIZE flag %x %lx not handled\n", wParam, lParam);
/*
} */
} */
/*
* Recompute the size/position of the tabs.
...
...
@@ -1450,7 +1507,7 @@ TAB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return
0
;
case
TCM_ADJUSTRECT
:
return
TAB_AdjustRect
(
hwnd
,
wParam
,
lParam
);
return
TAB_AdjustRect
(
hwnd
,
(
BOOL
)
wParam
,
(
LPRECT
)
lParam
);
case
TCM_SETITEMSIZE
:
FIXME
(
tab
,
"Unimplemented msg TCM_SETITEMSIZE
\n
"
);
...
...
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