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
ca5757f8
Commit
ca5757f8
authored
Jul 20, 2001
by
Guy L. Albertelli
Committed by
Alexandre Julliard
Jul 20, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Recalc the toolbar size on TB_SETBUTTONSIZE in certain conditions.
- Add trace to show the paint rectangle prior to refreshing.
parent
6eb7273e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
3 deletions
+33
-3
toolbar.c
dlls/comctl32/toolbar.c
+33
-3
No files found.
dlls/comctl32/toolbar.c
View file @
ca5757f8
...
...
@@ -3270,12 +3270,39 @@ TOOLBAR_SetButtonWidth (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
TOOLBAR_INFO
*
infoPtr
=
TOOLBAR_GetInfoPtr
(
hwnd
);
if
(
infoPtr
==
NULL
)
if
(
infoPtr
==
NULL
)
{
TRACE
(
"Toolbar not initialized yet?????
\n
"
);
return
FALSE
;
}
/* if setting to current values, ignore */
if
((
infoPtr
->
cxMin
==
(
INT
)
LOWORD
(
lParam
))
&&
(
infoPtr
->
cxMax
==
(
INT
)
HIWORD
(
lParam
)))
{
TRACE
(
"matches current width, min=%d, max=%d, no recalc
\n
"
,
infoPtr
->
cxMin
,
infoPtr
->
cxMax
);
return
TRUE
;
}
/* save new values */
infoPtr
->
cxMin
=
(
INT
)
LOWORD
(
lParam
);
infoPtr
->
cxMax
=
(
INT
)
HIWORD
(
lParam
);
/* if both values are 0 then we are done */
if
(
lParam
==
0
)
{
TRACE
(
"setting both min and max to 0, norecalc
\n
"
);
return
TRUE
;
}
/* otherwise we need to recalc the toolbar and in some cases
recalc the bounding rectangle (does DrawText w/ DT_CALCRECT
which doesn't actually draw - GA). */
TRACE
(
"number of buttons %d, cx=%d, cy=%d, recalcing
\n
"
,
infoPtr
->
nNumButtons
,
infoPtr
->
cxMin
,
infoPtr
->
cxMax
);
TOOLBAR_CalcToolbar
(
hwnd
);
InvalidateRect
(
hwnd
,
NULL
,
TRUE
);
return
TRUE
;
}
...
...
@@ -4160,12 +4187,15 @@ TOOLBAR_Paint (HWND hwnd, WPARAM wParam)
HDC
hdc
;
PAINTSTRUCT
ps
;
TRACE
(
"
\n
"
);
/* fill ps.rcPaint with a default rect */
memcpy
(
&
(
ps
.
rcPaint
),
&
(
infoPtr
->
rcBound
),
sizeof
(
infoPtr
->
rcBound
));
hdc
=
wParam
==
0
?
BeginPaint
(
hwnd
,
&
ps
)
:
(
HDC
)
wParam
;
TRACE
(
"psrect=(%d,%d)-(%d,%d)
\n
"
,
ps
.
rcPaint
.
left
,
ps
.
rcPaint
.
top
,
ps
.
rcPaint
.
right
,
ps
.
rcPaint
.
bottom
);
TOOLBAR_Refresh
(
hwnd
,
hdc
,
&
ps
);
if
(
!
wParam
)
EndPaint
(
hwnd
,
&
ps
);
...
...
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