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
3fe864dc
Commit
3fe864dc
authored
Jul 11, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Jul 11, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace CURSORICON_CreateFromResource by CreateIconFromResourceEx.
parent
2d7ea238
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
24 deletions
+11
-24
cursoricon.c
dlls/user/cursoricon.c
+11
-24
No files found.
dlls/user/cursoricon.c
View file @
3fe864dc
...
...
@@ -660,16 +660,15 @@ fail:
/**********************************************************************
* CURSORICON_CreateFromResource
*
* Create a cursor or icon from in-memory resource template.
* CreateIconFromResourceEx (USER32.@)
*
* FIXME: Convert to mono when cFlag is LR_MONOCHROME. Do something
* with cbSize parameter as well.
*/
static
HICON
CURSORICON_CreateFromResource
(
LPBYTE
bits
,
UINT
cbSize
,
BOOL
bIcon
,
DWORD
dwVersion
,
INT
width
,
INT
height
,
UINT
loadflags
)
HICON
WINAPI
CreateIconFromResourceEx
(
LPBYTE
bits
,
UINT
cbSize
,
BOOL
bIcon
,
DWORD
dwVersion
,
INT
width
,
INT
height
,
UINT
cFlag
)
{
HGLOBAL16
hObj
;
static
HDC
hdcMem
;
...
...
@@ -686,7 +685,7 @@ static HICON CURSORICON_CreateFromResource( LPBYTE bits,
TRACE_
(
cursor
)(
"%08x (%u bytes), ver %08x, %ix%i %s %s
\n
"
,
(
unsigned
)
bits
,
cbSize
,
(
unsigned
)
dwVersion
,
width
,
height
,
bIcon
?
"icon"
:
"cursor"
,
(
loadflags
&
LR_MONOCHROME
)
?
"mono"
:
""
);
bIcon
?
"icon"
:
"cursor"
,
(
cFlag
&
LR_MONOCHROME
)
?
"mono"
:
""
);
if
(
dwVersion
==
0x00020000
)
{
FIXME_
(
cursor
)(
"
\t
2.xx resources are not supported
\n
"
);
...
...
@@ -882,18 +881,6 @@ HICON WINAPI CreateIconFromResource( LPBYTE bits, UINT cbSize,
/**********************************************************************
* CreateIconFromResourceEx (USER32.@)
*/
HICON
WINAPI
CreateIconFromResourceEx
(
LPBYTE
bits
,
UINT
cbSize
,
BOOL
bIcon
,
DWORD
dwVersion
,
INT
width
,
INT
height
,
UINT
cFlag
)
{
return
CURSORICON_CreateFromResource
(
bits
,
cbSize
,
bIcon
,
dwVersion
,
width
,
height
,
cFlag
);
}
/**********************************************************************
* CURSORICON_Load
*
* Load a cursor or icon from resource or file.
...
...
@@ -919,7 +906,7 @@ static HICON CURSORICON_Load(HINSTANCE hInstance, LPCWSTR name,
else
dirEntry
=
(
CURSORICONDIRENTRY
*
)
CURSORICON_FindBestIcon
(
dir
,
width
,
height
,
colors
);
bits
=
ptr
[
dirEntry
->
wResId
-
1
];
hIcon
=
C
URSORICON_CreateFromResource
(
bits
,
dirEntry
->
dwBytesInRes
,
hIcon
=
C
reateIconFromResourceEx
(
bits
,
dirEntry
->
dwBytesInRes
,
!
fCursor
,
0x00030000
,
width
,
height
,
loadflags
);
HeapFree
(
GetProcessHeap
(),
0
,
dir
);
HeapFree
(
GetProcessHeap
(),
0
,
ptr
);
...
...
@@ -971,7 +958,7 @@ static HICON CURSORICON_Load(HINSTANCE hInstance, LPCWSTR name,
if
(
!
(
handle
=
LoadResource
(
hInstance
,
hRsrc
)))
return
0
;
bits
=
(
LPBYTE
)
LockResource
(
handle
);
hIcon
=
C
URSORICON_CreateFromResource
(
bits
,
dwBytesInRes
,
hIcon
=
C
reateIconFromResourceEx
(
bits
,
dwBytesInRes
,
!
fCursor
,
0x00030000
,
width
,
height
,
loadflags
);
FreeResource
(
handle
);
...
...
@@ -1025,7 +1012,7 @@ static HICON CURSORICON_Copy( HINSTANCE16 hInst16, HICON hIcon )
*
* NOTES
* LR_COPYDELETEORG and LR_MONOCHROME are currently not implemented.
* LR_MONOCHROME should be implemented by C
URSORICON_CreateFromResource
.
* LR_MONOCHROME should be implemented by C
reateIconFromResourceEx
.
* LR_COPYFROMRESOURCE will only work if the Image is in the Cache.
*
*
...
...
@@ -1140,7 +1127,7 @@ static HICON CURSORICON_ExtCopy(HICON hIcon, UINT nType,
/* Create a New Icon with the proper dimension
*/
hNew
=
C
URSORICON_CreateFromResource
(
pBits
,
dwBytesInRes
,
hNew
=
C
reateIconFromResourceEx
(
pBits
,
dwBytesInRes
,
bIsIcon
,
0x00030000
,
iTargetCX
,
iTargetCY
,
nFlags
);
FreeResource
(
hMem
);
}
...
...
@@ -1670,7 +1657,7 @@ HICON16 WINAPI LoadIconHandler16( HGLOBAL16 hResource, BOOL16 bNew )
TRACE_
(
cursor
)(
"hRes=%04x
\n
"
,
hResource
);
return
HICON_16
(
C
URSORICON_CreateFromResource
(
bits
,
0
,
TRUE
,
return
HICON_16
(
C
reateIconFromResourceEx
(
bits
,
0
,
TRUE
,
bNew
?
0x00030000
:
0x00020000
,
0
,
0
,
LR_DEFAULTCOLOR
));
}
...
...
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