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
1048ebb3
Commit
1048ebb3
authored
May 19, 2003
by
Mike McCormack
Committed by
Alexandre Julliard
May 19, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Semi-correct implementation of OleMetafilePictFromIconAndLabel.
parent
3b570864
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
2 deletions
+62
-2
ole32.spec
dlls/ole32/ole32.spec
+1
-1
ole32_main.c
dlls/ole32/ole32_main.c
+61
-1
No files found.
dlls/ole32/ole32.spec
View file @
1048ebb3
...
@@ -112,7 +112,7 @@
...
@@ -112,7 +112,7 @@
112 stdcall OleLoad(ptr ptr ptr ptr)
112 stdcall OleLoad(ptr ptr ptr ptr)
113 stdcall OleLoadFromStream(ptr ptr ptr)
113 stdcall OleLoadFromStream(ptr ptr ptr)
114 stdcall OleLockRunning(ptr long long)
114 stdcall OleLockRunning(ptr long long)
115 st
ub OleMetafilePictFromIconAndLabel
115 st
dcall OleMetafilePictFromIconAndLabel(long ptr ptr long)
116 stub OleNoteObjectVisible
116 stub OleNoteObjectVisible
117 stdcall OleQueryCreateFromData(ptr)
117 stdcall OleQueryCreateFromData(ptr)
118 stdcall OleQueryLinkFromData(ptr)
118 stdcall OleQueryLinkFromData(ptr)
...
...
dlls/ole32/ole32_main.c
View file @
1048ebb3
...
@@ -20,6 +20,9 @@
...
@@ -20,6 +20,9 @@
#include "windef.h"
#include "windef.h"
#include "winerror.h"
#include "winerror.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "ole32_main.h"
#include "ole32_main.h"
#include "wine/debug.h"
#include "wine/debug.h"
...
@@ -28,9 +31,66 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole);
...
@@ -28,9 +31,66 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole);
HINSTANCE
OLE32_hInstance
=
0
;
HINSTANCE
OLE32_hInstance
=
0
;
/***********************************************************************
/***********************************************************************
*
DllMain (OLE32.@
)
*
OleMetafilePictFromIconAndLabel (OLE32.115
)
*/
*/
HGLOBAL
WINAPI
OleMetafilePictFromIconAndLabel
(
HICON
hIcon
,
LPOLESTR
lpszLabel
,
LPOLESTR
lpszSourceFile
,
UINT
iIconIndex
)
{
HMETAFILE
hmf
;
HDC
hdc
;
UINT
dy
,
mfsize
;
HGLOBAL
hmem
=
0
;
LPVOID
mfdata
;
TRACE
(
"%p %p %p %d
\n
"
,
hIcon
,
lpszLabel
,
lpszSourceFile
,
iIconIndex
);
if
(
!
hIcon
)
return
0
;
hdc
=
CreateMetaFileW
(
NULL
);
if
(
!
hdc
)
return
0
;
/* FIXME: things are drawn in the wrong place */
DrawIcon
(
hdc
,
0
,
0
,
hIcon
);
dy
=
GetSystemMetrics
(
SM_CXICON
);
if
(
lpszLabel
)
TextOutW
(
hdc
,
0
,
dy
,
lpszLabel
,
lstrlenW
(
lpszLabel
));
hmf
=
CloseMetaFile
(
hdc
);
if
(
!
hmf
)
return
0
;
mfsize
=
GetMetaFileBitsEx
(
hmf
,
0
,
NULL
);
if
(
!
mfsize
)
goto
end
;
hmem
=
GlobalAlloc
(
GMEM_MOVEABLE
,
mfsize
);
if
(
!
hmem
)
goto
end
;
mfdata
=
GlobalLock
(
hmem
);
if
(
!
mfdata
)
{
GlobalFree
(
hmem
);
hmem
=
0
;
goto
end
;
}
GetMetaFileBitsEx
(
hmf
,
mfsize
,
mfdata
);
GlobalUnlock
(
hmem
);
end:
DeleteMetaFile
(
hmf
);
TRACE
(
"returning %p
\n
"
,
hmem
);
return
hmem
;
}
/***********************************************************************
* DllMain (OLE32.@)
*/
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
fImpLoad
)
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
fImpLoad
)
{
{
TRACE
(
"%p 0x%lx %p
\n
"
,
hinstDLL
,
fdwReason
,
fImpLoad
);
TRACE
(
"%p 0x%lx %p
\n
"
,
hinstDLL
,
fdwReason
,
fImpLoad
);
...
...
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