3 * OLE2 library - 16 bit only interfaces
5 * Copyright 1995 Martin von Loewis
6 * Copyright 1999 Francis Beaudet
7 * Copyright 1999 Noel Borthwick
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
32 #define NONAMELESSUNION
33 #define NONAMELESSSTRUCT
45 #include "wine/winbase16.h"
46 #include "wine/wingdi16.h"
47 #include "wine/winuser16.h"
48 #include "ole32_main.h"
51 #include "wine/debug.h"
53 WINE_DEFAULT_DEBUG_CHANNEL(ole);
54 WINE_DECLARE_DEBUG_CHANNEL(accel);
56 #define HICON_16(h32) (LOWORD(h32))
57 #define HICON_32(h16) ((HICON)(ULONG_PTR)(h16))
58 #define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16))
60 /***********************************************************************
61 * RegisterDragDrop (OLE2.35)
63 HRESULT WINAPI RegisterDragDrop16(
65 LPDROPTARGET pDropTarget
67 FIXME("(0x%04x,%p),stub!\n",hwnd,pDropTarget);
71 /***********************************************************************
72 * RevokeDragDrop (OLE2.36)
74 HRESULT WINAPI RevokeDragDrop16(
77 FIXME("(0x%04x),stub!\n",hwnd);
81 /******************************************************************************
82 * OleMetaFilePictFromIconAndLabel (OLE2.56)
84 * Returns a global memory handle to a metafile which contains the icon and
86 * I guess the result of that should look somehow like desktop icons.
87 * If no hIcon is given, we load the icon via lpszSourceFile and iIconIndex.
88 * This code might be wrong at some places.
90 HGLOBAL16 WINAPI OleMetaFilePictFromIconAndLabel16(
92 LPCOLESTR16 lpszLabel,
93 LPCOLESTR16 lpszSourceFile,
100 FIXME("(%04x, '%s', '%s', %d): incorrect metrics, please try to correct them !\n\n\n", hIcon, lpszLabel, lpszSourceFile, iIconIndex);
103 if (lpszSourceFile) {
104 HINSTANCE16 hInstance = LoadLibrary16(lpszSourceFile);
106 /* load the icon at index from lpszSourceFile */
107 hIcon = HICON_16(LoadIconA(HINSTANCE_32(hInstance), (LPCSTR)(DWORD)iIconIndex));
108 FreeLibrary16(hInstance);
113 hdc = CreateMetaFileA(NULL);
114 DrawIcon(hdc, 0, 0, HICON_32(hIcon)); /* FIXME */
115 TextOutA(hdc, 0, 0, lpszLabel, 1); /* FIXME */
116 hmf = GlobalAlloc16(0, sizeof(METAFILEPICT16));
117 mf = (METAFILEPICT16 *)GlobalLock16(hmf);
118 mf->mm = MM_ANISOTROPIC;
119 mf->xExt = 20; /* FIXME: bogus */
120 mf->yExt = 20; /* dito */
121 mf->hMF = CloseMetaFile16(HDC_16(hdc));
126 /******************************************************************************
127 * CreateItemMoniker (OLE2.27)
129 HRESULT WINAPI CreateItemMoniker16(LPCOLESTR16 lpszDelim,LPCOLESTR16 lpszItem,LPMONIKER* ppmk)
131 FIXME("(%s,%p),stub!\n",lpszDelim,ppmk);
137 /******************************************************************************
138 * CreateFileMoniker (OLE2.28)
140 HRESULT WINAPI CreateFileMoniker16(LPCOLESTR16 lpszPathName,LPMONIKER* ppmk)
142 FIXME("(%s,%p),stub!\n",lpszPathName,ppmk);