Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jason Beetham
wine
Commits
102e1f46
Commit
102e1f46
authored
25 years ago
by
Andreas Mohr
Committed by
Alexandre Julliard
25 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Kind of implemented OleMetaFilePictFromIconAndLabel.
parent
74e77c27
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
if1632/ole2.spec
+1
-1
1 addition, 1 deletion
if1632/ole2.spec
ole/ole2.c
+44
-0
44 additions, 0 deletions
ole/ole2.c
with
45 additions
and
1 deletion
if1632/ole2.spec
+
1
−
1
View file @
102e1f46
...
...
@@ -56,7 +56,7 @@ type win16
53 stub OLEGETICONOFCLASS
54 stub CREATEILOCKBYTESONHGLOBAL
55 stub GETHGLOBALFROMILOCKBYTES
56
stub OLEMETAFILEPICTFROMICONANDLABEL
56
pascal16 OleMetaFilePictFromIconAndLabel(word str str word) OleMetaFilePictFromIconAndLabel16
57 stub GETCLASSFILE
58 stub OLEDRAW
59 stub OLECREATEDEFAULTHANDLER
...
...
This diff is collapsed.
Click to expand it.
ole/ole2.c
+
44
−
0
View file @
102e1f46
...
...
@@ -17,6 +17,7 @@
#include
"hook.h"
#include
"commctrl.h"
#include
"wine/obj_clientserver.h"
#include
"wine/wingdi16.h"
#include
"debug.h"
#include
"ole2ver.h"
#include
"winreg.h"
...
...
@@ -2100,3 +2101,46 @@ static void OLEUTL_ReadRegistryDWORDValue(
}
}
/******************************************************************************
* OleMetaFilePictFromIconAndLabel
*
* Returns a global memory handle to a metafile which contains the icon and
* label given.
* I guess the result of that should look somehow like desktop icons.
* If no hIcon is given, we load the icon via lpszSourceFile and iIconIndex.
* This code might be wrong at some places.
*/
HGLOBAL16
WINAPI
OleMetaFilePictFromIconAndLabel16
(
HICON
hIcon
,
LPOLESTR
lpszLabel
,
LPOLESTR
lpszSourceFile
,
UINT16
iIconIndex
)
{
METAFILEPICT16
*
mf
;
HGLOBAL16
hmf
;
HDC16
hdc
;
FIXME
(
ole
,
"(%04x, '%s', '%s', %d): incorrect metrics, please try to correct them !
\n\n\n
"
,
hIcon
,
(
LPCSTR
)
lpszLabel
,
(
LPCSTR
)
lpszSourceFile
,
iIconIndex
);
if
(
!
hIcon
)
{
if
(
lpszSourceFile
)
{
HINSTANCE16
hInstance
=
LoadLibrary16
((
LPCSTR
)
lpszSourceFile
);
/* load the icon at index from lpszSourceFile */
hIcon
=
(
HICON16
)
LoadIconA
(
hInstance
,
(
LPCSTR
)(
DWORD
)
iIconIndex
);
FreeLibrary16
(
hInstance
);
}
else
return
(
HGLOBAL
)
NULL
;
}
hdc
=
CreateMetaFile16
(
NULL
);
DrawIcon
(
hdc
,
0
,
0
,
hIcon
);
/* FIXME */
TextOut16
(
hdc
,
0
,
0
,
(
LPCSTR
)
lpszLabel
,
1
);
/* FIXME */
hmf
=
GlobalAlloc16
(
0
,
sizeof
(
METAFILEPICT16
));
mf
=
(
METAFILEPICT16
*
)
GlobalLock16
(
hmf
);
mf
->
mm
=
MM_ANISOTROPIC
;
mf
->
xExt
=
20
;
/* FIXME: bogus */
mf
->
yExt
=
20
;
/* dito */
mf
->
hMF
=
CloseMetaFile16
(
hdc
);
return
hmf
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment