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
32eb1c73
Commit
32eb1c73
authored
May 13, 2003
by
Vitaliy Margolen
Committed by
Alexandre Julliard
May 13, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of direct ImageList access hacks.
parent
e43edbd5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
22 deletions
+9
-22
toolbar.c
dlls/comctl32/toolbar.c
+9
-22
No files found.
dlls/comctl32/toolbar.c
View file @
32eb1c73
...
...
@@ -67,7 +67,6 @@
#include "winuser.h"
#include "wine/unicode.h"
#include "commctrl.h"
#include "imagelist.h"
#include "comctl32.h"
#include "wine/debug.h"
...
...
@@ -573,44 +572,35 @@ static void
TOOLBAR_DrawMasked
(
TOOLBAR_INFO
*
infoPtr
,
TBUTTON_INFO
*
btnPtr
,
HDC
hdc
,
INT
x
,
INT
y
)
{
/* FIXME: this function is a hack since it uses image list
internals directly */
HIMAGELIST
himl
=
GETDEFIMAGELIST
(
infoPtr
,
0
);
INT
cx
,
cy
;
HBITMAP
hbmMask
;
HDC
hdcImageList
;
HDC
hdcMask
;
if
(
!
himl
)
return
;
ImageList_GetIconSize
(
himl
,
&
cx
,
&
cy
);
/* create new dc's */
hdcImageList
=
CreateCompatibleDC
(
0
);
hdcMask
=
CreateCompatibleDC
(
0
);
/* create new bitmap */
hbmMask
=
CreateBitmap
(
himl
->
cx
,
himl
->
cy
,
1
,
1
,
NULL
);
hbmMask
=
CreateBitmap
(
cx
,
cy
,
1
,
1
,
NULL
);
SelectObject
(
hdcMask
,
hbmMask
);
/* copy the mask bitmap */
SelectObject
(
hdcImageList
,
himl
->
hbmMask
);
SetBkColor
(
hdcImageList
,
RGB
(
255
,
255
,
255
));
SetTextColor
(
hdcImageList
,
RGB
(
0
,
0
,
0
));
BitBlt
(
hdcMask
,
0
,
0
,
himl
->
cx
,
himl
->
cy
,
hdcImageList
,
himl
->
cx
*
btnPtr
->
iBitmap
,
0
,
SRCCOPY
);
ImageList_DrawEx
(
himl
,
btnPtr
->
iBitmap
,
hdcMask
,
0
,
0
,
0
,
0
,
RGB
(
255
,
255
,
255
),
RGB
(
0
,
0
,
0
),
ILD_MASK
);
/* draw the new mask */
SelectObject
(
hdc
,
GetSysColorBrush
(
COLOR_3DHILIGHT
));
BitBlt
(
hdc
,
x
+
1
,
y
+
1
,
himl
->
cx
,
himl
->
cy
,
hdcMask
,
0
,
0
,
0xB8074A
);
BitBlt
(
hdc
,
x
+
1
,
y
+
1
,
cx
,
cy
,
hdcMask
,
0
,
0
,
0xB8074A
);
SelectObject
(
hdc
,
GetSysColorBrush
(
COLOR_3DSHADOW
));
BitBlt
(
hdc
,
x
,
y
,
himl
->
cx
,
himl
->
cy
,
hdcMask
,
0
,
0
,
0xB8074A
);
BitBlt
(
hdc
,
x
,
y
,
cx
,
cy
,
hdcMask
,
0
,
0
,
0xB8074A
);
DeleteObject
(
hbmMask
);
DeleteDC
(
hdcMask
);
DeleteDC
(
hdcImageList
);
}
...
...
@@ -3962,11 +3952,8 @@ TOOLBAR_SetBitmapSize (HWND hwnd, WPARAM wParam, LPARAM lParam)
infoPtr
->
nBitmapWidth
=
(
INT
)
LOWORD
(
lParam
);
infoPtr
->
nBitmapHeight
=
(
INT
)
HIWORD
(
lParam
);
/* uses image list internals directly */
if
(
himlDef
)
{
himlDef
->
cx
=
infoPtr
->
nBitmapWidth
;
himlDef
->
cy
=
infoPtr
->
nBitmapHeight
;
}
if
(
himlDef
)
ImageList_SetIconSize
(
himlDef
,
infoPtr
->
nBitmapWidth
,
infoPtr
->
nBitmapHeight
);
return
TRUE
;
}
...
...
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