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
ed39e7c0
Commit
ed39e7c0
authored
Feb 03, 2004
by
Jon Griffiths
Committed by
Alexandre Julliard
Feb 03, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Draw disabled toolbar buttons correctly.
parent
4a4b5d40
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
25 deletions
+37
-25
toolbar.c
dlls/comctl32/toolbar.c
+37
-25
No files found.
dlls/comctl32/toolbar.c
View file @
ed39e7c0
...
@@ -614,39 +614,51 @@ TOOLBAR_DrawPattern (HDC hdc, LPRECT lpRect)
...
@@ -614,39 +614,51 @@ TOOLBAR_DrawPattern (HDC hdc, LPRECT lpRect)
}
}
static
void
static
void
TOOLBAR_DrawMasked
(
TOOLBAR_INFO
*
infoPtr
,
TBUTTON_INFO
*
btnPtr
,
TOOLBAR_DrawMasked
(
TOOLBAR_INFO
*
infoPtr
,
TBUTTON_INFO
*
btnPtr
,
HDC
hdc
,
INT
x
,
INT
y
)
HDC
hdc
,
INT
x
,
INT
y
)
{
{
HIMAGELIST
himl
=
GETDEFIMAGELIST
(
infoPtr
,
0
);
HIMAGELIST
himl
=
GETDEFIMAGELIST
(
infoPtr
,
0
);
INT
cx
,
cy
;
HBITMAP
hbmMask
;
HDC
hdcMask
;
if
(
!
himl
)
if
(
himl
)
return
;
{
INT
cx
,
cy
;
HBITMAP
hbmMask
,
hbmImage
;
HDC
hdcMask
,
hdcImage
;
ImageList_GetIconSize
(
himl
,
&
cx
,
&
cy
);
ImageList_GetIconSize
(
himl
,
&
cx
,
&
cy
);
/* create new dc's */
/* Create src image */
hdcMask
=
CreateCompatibleDC
(
0
);
hdcImage
=
CreateCompatibleDC
(
hdc
);
hbmImage
=
CreateBitmap
(
cx
,
cy
,
GetDeviceCaps
(
hdc
,
PLANES
),
/* create new bitmap */
GetDeviceCaps
(
hdc
,
BITSPIXEL
),
NULL
);
hbmMask
=
CreateBitmap
(
cx
,
cy
,
1
,
1
,
NULL
);
SelectObject
(
hdcImage
,
hbmImage
);
SelectObject
(
hdcMask
,
hbmMask
);
ImageList_DrawEx
(
himl
,
btnPtr
->
iBitmap
,
hdcImage
,
0
,
0
,
cx
,
cy
,
RGB
(
0xff
,
0xff
,
0xff
),
RGB
(
0
,
0
,
0
),
ILD_NORMAL
);
/* copy the mask bitmap */
ImageList_DrawEx
(
himl
,
btnPtr
->
iBitmap
,
hdcMask
,
0
,
0
,
0
,
0
,
RGB
(
255
,
255
,
255
),
RGB
(
0
,
0
,
0
),
ILD_MASK
);
/* Create Mask */
hdcMask
=
CreateCompatibleDC
(
0
);
/* draw the new mask */
hbmMask
=
CreateBitmap
(
cx
,
cy
,
1
,
1
,
NULL
);
SelectObject
(
hdc
,
GetSysColorBrush
(
COLOR_3DHILIGHT
));
SelectObject
(
hdcMask
,
hbmMask
);
BitBlt
(
hdc
,
x
+
1
,
y
+
1
,
cx
,
cy
,
hdcMask
,
0
,
0
,
0xB8074A
);
/* Remove the background and all white pixels */
SelectObject
(
hdc
,
GetSysColorBrush
(
COLOR_3DSHADOW
));
SetBkColor
(
hdcImage
,
ImageList_GetBkColor
(
himl
));
BitBlt
(
hdc
,
x
,
y
,
cx
,
cy
,
hdcMask
,
0
,
0
,
0xB8074A
);
BitBlt
(
hdcMask
,
0
,
0
,
cx
,
cy
,
hdcImage
,
0
,
0
,
SRCCOPY
);
SetBkColor
(
hdcImage
,
RGB
(
0xff
,
0xff
,
0xff
));
BitBlt
(
hdcMask
,
0
,
0
,
cx
,
cy
,
hdcImage
,
0
,
0
,
NOTSRCERASE
);
/* draw the new mask 'etched' to hdc */
SetBkColor
(
hdc
,
RGB
(
255
,
255
,
255
));
SelectObject
(
hdc
,
GetSysColorBrush
(
COLOR_3DHILIGHT
));
BitBlt
(
hdc
,
x
+
1
,
y
+
1
,
cx
,
cy
,
hdcMask
,
0
,
0
,
0xE20746
);
SelectObject
(
hdc
,
GetSysColorBrush
(
COLOR_3DSHADOW
));
BitBlt
(
hdc
,
x
,
y
,
cx
,
cy
,
hdcMask
,
0
,
0
,
0xE20746
);
/* Cleanup */
DeleteObject
(
hbmImage
);
DeleteDC
(
hdcImage
);
DeleteObject
(
hbmMask
);
DeleteObject
(
hbmMask
);
DeleteDC
(
hdcMask
);
DeleteDC
(
hdcMask
);
}
}
}
...
...
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