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
67e1ac9a
Commit
67e1ac9a
authored
Jan 04, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell: Convert the about icon to 32-bit explicitly instead of casting the handle.
parent
81085498
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
shell.c
dlls/shell.dll16/shell.c
+18
-4
No files found.
dlls/shell.dll16/shell.c
View file @
67e1ac9a
...
...
@@ -42,6 +42,7 @@
#include "shlwapi.h"
#include "wine/winbase16.h"
#include "wine/winuser16.h"
#include "wine/debug.h"
...
...
@@ -52,7 +53,6 @@ extern HINSTANCE WINAPI WOWShellExecute(HWND hWnd, LPCSTR lpOperation,LPCSTR lpF
INT
iShowCmd
,
void
*
callback
);
#define HICON_16(h32) (LOWORD(h32))
#define HICON_32(h16) ((HICON)(ULONG_PTR)(h16))
#define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16))
#define HINSTANCE_16(h32) (LOWORD(h32))
...
...
@@ -73,6 +73,17 @@ static UINT uMsgWndCreated = 0;
static
UINT
uMsgWndDestroyed
=
0
;
static
UINT
uMsgShellActivate
=
0
;
static
HICON
convert_icon_to_32
(
HICON16
icon16
)
{
CURSORICONINFO
*
info
=
GlobalLock16
(
icon16
);
void
*
and_bits
=
info
+
1
;
void
*
xor_bits
=
(
BYTE
*
)
and_bits
+
info
->
nHeight
*
2
*
((
info
->
nWidth
+
15
)
/
16
);
HICON
ret
=
CreateIcon
(
0
,
info
->
nWidth
,
info
->
nHeight
,
info
->
bPlanes
,
info
->
bBitsPerPixel
,
and_bits
,
xor_bits
);
GlobalUnlock16
(
icon16
);
return
ret
;
}
/***********************************************************************
* DllEntryPoint [SHELL.101]
*
...
...
@@ -183,9 +194,12 @@ BOOL16 WINAPI AboutDlgProc16( HWND16 hWnd, UINT16 msg, WPARAM16 wParam,
/*************************************************************************
* ShellAbout (SHELL.22)
*/
BOOL16
WINAPI
ShellAbout16
(
HWND16
hWnd
,
LPCSTR
szApp
,
LPCSTR
szOtherStuff
,
HICON16
hIcon
)
{
return
ShellAboutA
(
HWND_32
(
hWnd
),
szApp
,
szOtherStuff
,
HICON_32
(
hIcon
)
);
BOOL16
WINAPI
ShellAbout16
(
HWND16
hWnd
,
LPCSTR
szApp
,
LPCSTR
szOtherStuff
,
HICON16
icon16
)
{
HICON
icon
=
convert_icon_to_32
(
icon16
);
BOOL
ret
=
ShellAboutA
(
HWND_32
(
hWnd
),
szApp
,
szOtherStuff
,
icon
);
DestroyIcon
(
icon
);
return
ret
;
}
/*************************************************************************
...
...
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