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
1d20af69
Commit
1d20af69
authored
Apr 15, 2000
by
Martin Fuchs
Committed by
Alexandre Julliard
Apr 15, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement CCS_NOMOVEY for tool bars.
parent
b5d37ec7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
6 deletions
+24
-6
toolbar.c
dlls/comctl32/toolbar.c
+24
-6
No files found.
dlls/comctl32/toolbar.c
View file @
1d20af69
...
...
@@ -1316,8 +1316,9 @@ TOOLBAR_AutoSize (HWND hwnd)
TOOLBAR_INFO
*
infoPtr
=
TOOLBAR_GetInfoPtr
(
hwnd
);
DWORD
dwStyle
=
GetWindowLongA
(
hwnd
,
GWL_STYLE
);
RECT
parent_rect
;
RECT
window_rect
;
HWND
parent
;
/* INT32 x, y; */
INT
x
,
y
;
INT
cx
,
cy
;
UINT
uPosFlags
=
0
;
...
...
@@ -1326,6 +1327,9 @@ TOOLBAR_AutoSize (HWND hwnd)
parent
=
GetParent
(
hwnd
);
GetClientRect
(
parent
,
&
parent_rect
);
x
=
parent_rect
.
left
;
y
=
parent_rect
.
top
;
if
(
dwStyle
&
CCS_NORESIZE
)
{
uPosFlags
|=
(
SWP_NOSIZE
|
SWP_NOMOVE
);
cx
=
0
;
...
...
@@ -1337,6 +1341,12 @@ TOOLBAR_AutoSize (HWND hwnd)
InvalidateRect
(
hwnd
,
NULL
,
TRUE
);
cy
=
infoPtr
->
nHeight
;
cx
=
infoPtr
->
nWidth
;
if
(
dwStyle
&
CCS_NOMOVEY
)
{
GetWindowRect
(
hwnd
,
&
window_rect
);
ScreenToClient
(
parent
,
(
LPPOINT
)
&
window_rect
.
left
);
y
=
window_rect
.
top
;
}
}
if
(
dwStyle
&
CCS_NOPARENTALIGN
)
...
...
@@ -1346,8 +1356,7 @@ TOOLBAR_AutoSize (HWND hwnd)
cy
+=
GetSystemMetrics
(
SM_CYEDGE
);
infoPtr
->
bAutoSize
=
TRUE
;
SetWindowPos
(
hwnd
,
HWND_TOP
,
parent_rect
.
left
,
parent_rect
.
top
,
cx
,
cy
,
uPosFlags
);
SetWindowPos
(
hwnd
,
HWND_TOP
,
x
,
y
,
cx
,
cy
,
uPosFlags
);
return
0
;
}
...
...
@@ -3333,8 +3342,9 @@ TOOLBAR_Size (HWND hwnd, WPARAM wParam, LPARAM lParam)
TOOLBAR_INFO
*
infoPtr
=
TOOLBAR_GetInfoPtr
(
hwnd
);
DWORD
dwStyle
=
GetWindowLongA
(
hwnd
,
GWL_STYLE
);
RECT
parent_rect
;
RECT
window_rect
;
HWND
parent
;
/* INT32 x, y; */
INT
x
,
y
;
INT
cx
,
cy
;
INT
flags
;
UINT
uPosFlags
=
0
;
...
...
@@ -3357,6 +3367,8 @@ TOOLBAR_Size (HWND hwnd, WPARAM wParam, LPARAM lParam)
/* width and height don't apply */
parent
=
GetParent
(
hwnd
);
GetClientRect
(
parent
,
&
parent_rect
);
x
=
parent_rect
.
left
;
y
=
parent_rect
.
top
;
if
(
dwStyle
&
CCS_NORESIZE
)
{
uPosFlags
|=
(
SWP_NOSIZE
|
SWP_NOMOVE
);
...
...
@@ -3374,6 +3386,12 @@ TOOLBAR_Size (HWND hwnd, WPARAM wParam, LPARAM lParam)
TOOLBAR_CalcToolbar
(
hwnd
);
cy
=
infoPtr
->
nHeight
;
cx
=
infoPtr
->
nWidth
;
if
(
dwStyle
&
CCS_NOMOVEY
)
{
GetWindowRect
(
hwnd
,
&
window_rect
);
ScreenToClient
(
parent
,
(
LPPOINT
)
&
window_rect
.
left
);
y
=
window_rect
.
top
;
}
}
if
(
dwStyle
&
CCS_NOPARENTALIGN
)
{
...
...
@@ -3385,9 +3403,9 @@ TOOLBAR_Size (HWND hwnd, WPARAM wParam, LPARAM lParam)
if
(
!
(
dwStyle
&
CCS_NODIVIDER
))
cy
+=
GetSystemMetrics
(
SM_CYEDGE
);
SetWindowPos
(
hwnd
,
0
,
parent_rect
.
left
,
parent_rect
.
top
,
cx
,
cy
,
uPosFlags
|
SWP_NOZORDER
);
SetWindowPos
(
hwnd
,
0
,
x
,
y
,
cx
,
cy
,
uPosFlags
|
SWP_NOZORDER
);
}
return
0
;
}
...
...
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