blob: 6321c0fe5d3a61bba7a2a15ca2040bc65cc67798 [file] [log] [blame]
Vincent Béron9a624912002-05-31 23:06:46 +00001/*
Bradley Baetza1491de2000-07-08 12:50:26 +00002 * Copyright 2000 Bradley Baetz
3 *
Alexandre Julliard0799c1a2002-03-09 23:29:33 +00004 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
Dimitrie O. Paun693cca52002-01-29 03:12:19 +000018 * FIXME: Some flags are ignored
Eric Pouech0639d602001-01-28 23:09:38 +000019 *
Bradley Baetza1491de2000-07-08 12:50:26 +000020 * Handle palettes
21 */
22
James Juranf4d5fef2001-01-26 20:43:40 +000023#include <string.h>
Bradley Baetza1491de2000-07-08 12:50:26 +000024#include "windef.h"
François Gouget44a18222000-12-19 04:53:20 +000025#include "winbase.h"
Bradley Baetza1491de2000-07-08 12:50:26 +000026#include "wingdi.h"
27#include "winuser.h"
Alexandre Julliard83f52d12000-09-26 22:20:14 +000028#include "wine/winbase16.h"
Alexandre Julliard0799c1a2002-03-09 23:29:33 +000029#include "wine/debug.h"
Bradley Baetza1491de2000-07-08 12:50:26 +000030#include "vfw.h"
Alexandre Julliard83f52d12000-09-26 22:20:14 +000031#include "vfw16.h"
Bradley Baetza1491de2000-07-08 12:50:26 +000032#include "windef.h"
33
Alexandre Julliard0799c1a2002-03-09 23:29:33 +000034WINE_DEFAULT_DEBUG_CHANNEL(msvideo);
Eric Pouech0639d602001-01-28 23:09:38 +000035
Bradley Baetza1491de2000-07-08 12:50:26 +000036typedef struct {
37 HDC hdc;
38 INT dxDst;
39 INT dyDst;
40 LPBITMAPINFOHEADER lpbi;
41 INT dxSrc;
42 INT dySrc;
43 HPALETTE hpal; /* Palette to use for the DIB */
44 BOOL begun; /* DrawDibBegin has been called */
45 LPBITMAPINFOHEADER lpbiOut; /* Output format */
46 HIC hic; /* HIC for decompression */
47 HDC hMemDC; /* DC for buffering */
48 HBITMAP hOldDib; /* Original Dib */
49 HBITMAP hDib; /* DibSection */
50 LPVOID lpvbits; /* Buffer for holding decompressed dib */
51} WINE_HDD;
52
53/***********************************************************************
Patrik Stridvall8b216b32001-06-19 18:20:47 +000054 * DrawDibOpen [MSVFW32.@]
Bradley Baetza1491de2000-07-08 12:50:26 +000055 */
56HDRAWDIB VFWAPI DrawDibOpen(void) {
57 HDRAWDIB hdd;
58
59 TRACE("(void)\n");
60 hdd = GlobalAlloc16(GHND,sizeof(WINE_HDD));
61 TRACE("=> %d\n",hdd);
62 return hdd;
63}
64
65/***********************************************************************
66 * DrawDibOpen [MSVIDEO.102]
67 */
68HDRAWDIB16 VFWAPI DrawDibOpen16(void) {
69 return (HDRAWDIB16)DrawDibOpen();
70}
71
72/***********************************************************************
Patrik Stridvall8b216b32001-06-19 18:20:47 +000073 * DrawDibClose [MSVFW32.@]
Bradley Baetza1491de2000-07-08 12:50:26 +000074 */
75BOOL VFWAPI DrawDibClose(HDRAWDIB hdd) {
76 WINE_HDD *whdd = GlobalLock16(hdd);
77
78 TRACE("(0x%08lx)\n",(DWORD)hdd);
79
80 if (!whdd)
81 return FALSE;
82
83 if (whdd->begun)
84 DrawDibEnd(hdd);
85
86 GlobalUnlock16(hdd);
87 GlobalFree16(hdd);
88 return TRUE;
89}
90
91/***********************************************************************
92 * DrawDibClose [MSVIDEO.103]
93 */
94BOOL16 VFWAPI DrawDibClose16(HDRAWDIB16 hdd) {
95 return DrawDibClose(hdd);
96}
97
98/***********************************************************************
Patrik Stridvall8b216b32001-06-19 18:20:47 +000099 * DrawDibEnd [MSVFW32.@]
Bradley Baetza1491de2000-07-08 12:50:26 +0000100 */
101BOOL VFWAPI DrawDibEnd(HDRAWDIB hdd) {
102 BOOL ret = TRUE;
103 WINE_HDD *whdd = GlobalLock16(hdd);
Vincent Béron9a624912002-05-31 23:06:46 +0000104
Bradley Baetza1491de2000-07-08 12:50:26 +0000105 TRACE("(0x%08lx)\n",(DWORD)hdd);
106
107 whdd->hpal = 0; /* Do not free this */
108 whdd->hdc = 0;
109 if (whdd->lpbi) {
110 HeapFree(GetProcessHeap(),0,whdd->lpbi);
111 whdd->lpbi = NULL;
112 }
113 if (whdd->lpbiOut) {
114 HeapFree(GetProcessHeap(),0,whdd->lpbiOut);
115 whdd->lpbiOut = NULL;
116 }
117
118 whdd->begun = FALSE;
119
120 /*if (whdd->lpvbits)
121 HeapFree(GetProcessHeap(),0,whdd->lpvbuf);*/
122
123 if (whdd->hMemDC) {
124 SelectObject(whdd->hMemDC,whdd->hOldDib);
125 DeleteDC(whdd->hMemDC);
126 }
127
128 if (whdd->hDib)
129 DeleteObject(whdd->hDib);
Vincent Béron9a624912002-05-31 23:06:46 +0000130
Bradley Baetza1491de2000-07-08 12:50:26 +0000131 if (whdd->hic) {
132 ICDecompressEnd(whdd->hic);
133 ICClose(whdd->hic);
134 }
135
136 whdd->lpvbits = NULL;
137
138 GlobalUnlock16(hdd);
139 return ret;
140}
141
142/***********************************************************************
143 * DrawDibEnd [MSVIDEO.105]
144 */
145BOOL16 VFWAPI DrawDibEnd16(HDRAWDIB16 hdd) {
146 return DrawDibEnd(hdd);
147}
148
149/***********************************************************************
Patrik Stridvall8b216b32001-06-19 18:20:47 +0000150 * DrawDibBegin [MSVFW32.@]
Bradley Baetza1491de2000-07-08 12:50:26 +0000151 */
152BOOL VFWAPI DrawDibBegin(HDRAWDIB hdd,
153 HDC hdc,
154 INT dxDst,
155 INT dyDst,
156 LPBITMAPINFOHEADER lpbi,
157 INT dxSrc,
158 INT dySrc,
159 UINT wFlags) {
160 BOOL ret = TRUE;
161 WINE_HDD *whdd;
162
163 TRACE("(%d,0x%lx,%d,%d,%p,%d,%d,0x%08lx)\n",
164 hdd,(DWORD)hdc,dxDst,dyDst,lpbi,dxSrc,dySrc,(DWORD)wFlags
165 );
Eric Pouech0639d602001-01-28 23:09:38 +0000166 TRACE("lpbi: %ld,%ld/%ld,%d,%d,%ld,%ld,%ld,%ld,%ld,%ld\n",
Vincent Béron9a624912002-05-31 23:06:46 +0000167 lpbi->biSize, lpbi->biWidth, lpbi->biHeight, lpbi->biPlanes,
168 lpbi->biBitCount, lpbi->biCompression, lpbi->biSizeImage,
169 lpbi->biXPelsPerMeter, lpbi->biYPelsPerMeter, lpbi->biClrUsed,
Eric Pouech0639d602001-01-28 23:09:38 +0000170 lpbi->biClrImportant);
Bradley Baetza1491de2000-07-08 12:50:26 +0000171
Eric Pouech0639d602001-01-28 23:09:38 +0000172 if (wFlags & ~(DDF_BUFFER))
173 FIXME("wFlags == 0x%08x not handled\n", wFlags & ~(DDF_BUFFER));
Bradley Baetza1491de2000-07-08 12:50:26 +0000174
175 whdd = (WINE_HDD*)GlobalLock16(hdd);
Eric Pouech0639d602001-01-28 23:09:38 +0000176 if (!whdd) return FALSE;
177
Bradley Baetza1491de2000-07-08 12:50:26 +0000178 if (whdd->begun)
179 DrawDibEnd(hdd);
180
181 if (lpbi->biCompression) {
Alexandre Julliard908464d2000-11-01 03:11:12 +0000182 DWORD size = 0;
Bradley Baetza1491de2000-07-08 12:50:26 +0000183
184 whdd->hic = ICOpen(ICTYPE_VIDEO,lpbi->biCompression,ICMODE_DECOMPRESS);
185 if (!whdd->hic) {
Eric Pouech0639d602001-01-28 23:09:38 +0000186 WARN("Could not open IC. biCompression == 0x%08lx\n",lpbi->biCompression);
Bradley Baetza1491de2000-07-08 12:50:26 +0000187 ret = FALSE;
188 }
189
190 if (ret) {
191 size = ICDecompressGetFormat(whdd->hic,lpbi,NULL);
192 if (size == ICERR_UNSUPPORTED) {
Eric Pouech0639d602001-01-28 23:09:38 +0000193 WARN("Codec doesn't support GetFormat, giving up.\n");
Bradley Baetza1491de2000-07-08 12:50:26 +0000194 ret = FALSE;
195 }
196 }
197
198 if (ret) {
199 whdd->lpbiOut = HeapAlloc(GetProcessHeap(),0,size);
200
201 if (ICDecompressGetFormat(whdd->hic,lpbi,whdd->lpbiOut) != ICERR_OK)
202 ret = FALSE;
203 }
204
205 if (ret) {
206 /* FIXME: Use Ex functions if available? */
207 if (ICDecompressBegin(whdd->hic,lpbi,whdd->lpbiOut) != ICERR_OK)
208 ret = FALSE;
209
210 TRACE("biSizeImage == %ld\n",whdd->lpbiOut->biSizeImage);
211 TRACE("biCompression == %ld\n",whdd->lpbiOut->biCompression);
212 TRACE("biBitCount == %d\n",whdd->lpbiOut->biBitCount);
213 }
214 } else {
Andreas Mohr0529c8b2001-01-03 21:30:03 +0000215 DWORD dwSize;
Bradley Baetza1491de2000-07-08 12:50:26 +0000216 /* No compression */
217 TRACE("Not compressed!\n");
Andreas Mohr0529c8b2001-01-03 21:30:03 +0000218 dwSize = lpbi->biSize + lpbi->biClrUsed*sizeof(RGBQUAD);
219 whdd->lpbiOut = HeapAlloc(GetProcessHeap(),0,dwSize);
220 memcpy(whdd->lpbiOut,lpbi,dwSize);
Bradley Baetza1491de2000-07-08 12:50:26 +0000221 }
222
223 if (ret) {
224 /*whdd->lpvbuf = HeapAlloc(GetProcessHeap(),0,whdd->lpbiOut->biSizeImage);*/
Vincent Béron9a624912002-05-31 23:06:46 +0000225
Bradley Baetza1491de2000-07-08 12:50:26 +0000226 whdd->hMemDC = CreateCompatibleDC(hdc);
227 TRACE("Creating: %ld,%p\n",whdd->lpbiOut->biSize,whdd->lpvbits);
228 whdd->hDib = CreateDIBSection(whdd->hMemDC,(BITMAPINFO *)whdd->lpbiOut,DIB_RGB_COLORS,&(whdd->lpvbits),0,0);
229 if (!whdd->hDib) {
230 TRACE("Error: %ld\n",GetLastError());
231 }
232 TRACE("Created: %d,%p\n",whdd->hDib,whdd->lpvbits);
233 whdd->hOldDib = SelectObject(whdd->hMemDC,whdd->hDib);
234 }
235
236 if (ret) {
237 whdd->hdc = hdc;
238 whdd->dxDst = dxDst;
239 whdd->dyDst = dyDst;
240 whdd->lpbi = HeapAlloc(GetProcessHeap(),0,lpbi->biSize);
241 memcpy(whdd->lpbi,lpbi,lpbi->biSize);
242 whdd->dxSrc = dxSrc;
243 whdd->dySrc = dySrc;
244 whdd->begun = TRUE;
245 whdd->hpal = 0;
246 } else {
247 if (whdd->hic)
248 ICClose(whdd->hic);
249 if (whdd->lpbiOut) {
250 HeapFree(GetProcessHeap(),0,whdd->lpbiOut);
251 whdd->lpbiOut = NULL;
252 }
253 }
254
255 GlobalUnlock16(hdd);
256
257 return ret;
258}
259
260/************************************************************************
261 * DrawDibBegin [MSVIDEO.104]
262 */
263BOOL16 VFWAPI DrawDibBegin16(HDRAWDIB16 hdd,
264 HDC16 hdc,
265 INT16 dxDst,
266 INT16 dyDst,
267 LPBITMAPINFOHEADER lpbi,
268 INT16 dxSrc,
269 INT16 dySrc,
270 UINT16 wFlags) {
271 return DrawDibBegin(hdd,hdc,dxDst,dyDst,lpbi,dxSrc,dySrc,wFlags);
272}
273
274/**********************************************************************
Patrik Stridvall8b216b32001-06-19 18:20:47 +0000275 * DrawDibDraw [MSVFW32.@]
Bradley Baetza1491de2000-07-08 12:50:26 +0000276 */
Andreas Mohr0529c8b2001-01-03 21:30:03 +0000277BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc,
278 INT xDst, INT yDst, INT dxDst, INT dyDst,
279 LPBITMAPINFOHEADER lpbi,
280 LPVOID lpBits,
281 INT xSrc, INT ySrc, INT dxSrc, INT dySrc,
282 UINT wFlags
283) {
Bradley Baetza1491de2000-07-08 12:50:26 +0000284 WINE_HDD *whdd;
285 BOOL ret = TRUE;
286
287 TRACE("(%d,0x%lx,%d,%d,%d,%d,%p,%p,%d,%d,%d,%d,0x%08lx)\n",
288 hdd,(DWORD)hdc,xDst,yDst,dxDst,dyDst,lpbi,lpBits,xSrc,ySrc,dxSrc,dySrc,(DWORD)wFlags
289 );
290
Vincent Béron9a624912002-05-31 23:06:46 +0000291 if (wFlags & ~(DDF_SAME_HDC | DDF_SAME_DRAW | DDF_NOTKEYFRAME |
Eric Pouech0639d602001-01-28 23:09:38 +0000292 DDF_UPDATE | DDF_DONTDRAW))
Bradley Baetza1491de2000-07-08 12:50:26 +0000293 FIXME("wFlags == 0x%08lx not handled\n",(DWORD)wFlags);
294
295 if (!lpBits) {
296 /* Undocumented? */
297 lpBits = (LPSTR)lpbi + (WORD)(lpbi->biSize) + (WORD)(lpbi->biClrUsed*sizeof(RGBQUAD));
298 }
299
300 whdd = GlobalLock16(hdd);
301
Alexandre Julliard908464d2000-11-01 03:11:12 +0000302#define CHANGED(x) (whdd->x != x)
Bradley Baetza1491de2000-07-08 12:50:26 +0000303
304 if ((!whdd->begun) || (!(wFlags & DDF_SAME_HDC) && CHANGED(hdc)) || (!(wFlags & DDF_SAME_DRAW) &&
305 (CHANGED(lpbi) || CHANGED(dxSrc) || CHANGED(dySrc) || CHANGED(dxDst) || CHANGED(dyDst)))) {
306 TRACE("Something changed!\n");
307 ret = DrawDibBegin(hdd,hdc,dxDst,dyDst,lpbi,dxSrc,dySrc,0);
308 }
309
310#undef CHANGED
311
Andreas Mohr0529c8b2001-01-03 21:30:03 +0000312 if ((dxDst == -1) && (dyDst == -1)) {
Bradley Baetza1491de2000-07-08 12:50:26 +0000313 dxDst = dxSrc;
314 dyDst = dySrc;
315 }
316
Eric Pouech0639d602001-01-28 23:09:38 +0000317 if (!(wFlags & DDF_UPDATE)) {
318 /* biSizeImage may be set to 0 for BI_RGB (uncompressed) bitmaps */
319 if ((lpbi->biCompression == BI_RGB) && (lpbi->biSizeImage == 0))
320 lpbi->biSizeImage = ((lpbi->biWidth * lpbi->biBitCount + 31) / 32) * 4 * lpbi->biHeight;
Andreas Mohr0529c8b2001-01-03 21:30:03 +0000321
Eric Pouech0639d602001-01-28 23:09:38 +0000322 if (lpbi->biCompression) {
323 DWORD flags = 0;
Vincent Béron9a624912002-05-31 23:06:46 +0000324
Eric Pouech0639d602001-01-28 23:09:38 +0000325 TRACE("Compression == 0x%08lx\n",lpbi->biCompression);
Vincent Béron9a624912002-05-31 23:06:46 +0000326
Eric Pouech0639d602001-01-28 23:09:38 +0000327 if (wFlags & DDF_NOTKEYFRAME)
328 flags |= ICDECOMPRESS_NOTKEYFRAME;
Vincent Béron9a624912002-05-31 23:06:46 +0000329
Eric Pouech0639d602001-01-28 23:09:38 +0000330 ICDecompress(whdd->hic,flags,lpbi,lpBits,whdd->lpbiOut,whdd->lpvbits);
331 } else {
332 memcpy(whdd->lpvbits,lpBits,lpbi->biSizeImage);
Vincent Béron9a624912002-05-31 23:06:46 +0000333 }
Bradley Baetza1491de2000-07-08 12:50:26 +0000334 }
Eric Pouech0639d602001-01-28 23:09:38 +0000335 if (!(wFlags & DDF_DONTDRAW) && whdd->hpal)
Andreas Mohr0529c8b2001-01-03 21:30:03 +0000336 SelectPalette(hdc,whdd->hpal,FALSE);
Bradley Baetza1491de2000-07-08 12:50:26 +0000337
Andreas Mohr0529c8b2001-01-03 21:30:03 +0000338 if (!(StretchBlt(whdd->hdc,xDst,yDst,dxDst,dyDst,whdd->hMemDC,xSrc,ySrc,dxSrc,dySrc,SRCCOPY)))
339 ret = FALSE;
Bradley Baetza1491de2000-07-08 12:50:26 +0000340
341 GlobalUnlock16(hdd);
342 return ret;
343}
344
345/**********************************************************************
346 * DrawDibDraw [MSVIDEO.106]
347 */
Vincent Béron9a624912002-05-31 23:06:46 +0000348BOOL16 VFWAPI DrawDibDraw16(HDRAWDIB16 hdd,
Bradley Baetza1491de2000-07-08 12:50:26 +0000349 HDC16 hdc,
350 INT16 xDst,
351 INT16 yDst,
352 INT16 dxDst,
353 INT16 dyDst,
354 LPBITMAPINFOHEADER lpbi,
355 LPVOID lpBits,
356 INT16 xSrc,
357 INT16 ySrc,
358 INT16 dxSrc,
359 INT16 dySrc,
360 UINT16 wFlags) {
361 return DrawDibDraw(hdd,hdc,xDst,yDst,dxDst,dyDst,lpbi,lpBits,xSrc,ySrc,dxSrc,dySrc,wFlags);
362}
363
364/*************************************************************************
Patrik Stridvall8b216b32001-06-19 18:20:47 +0000365 * DrawDibStart [MSVFW32.@]
Bradley Baetza1491de2000-07-08 12:50:26 +0000366 */
367BOOL VFWAPI DrawDibStart(HDRAWDIB hdd, DWORD rate) {
368 FIXME("(0x%08lx,%ld), stub\n",(DWORD)hdd,rate);
369 return TRUE;
370}
371
372/*************************************************************************
373 * DrawDibStart [MSVIDEO.118]
374 */
375BOOL16 VFWAPI DrawDibStart16(HDRAWDIB16 hdd, DWORD rate) {
376 return DrawDibStart(hdd,rate);
377}
378
379/*************************************************************************
Patrik Stridvall8b216b32001-06-19 18:20:47 +0000380 * DrawDibStop [MSVFW32.@]
Bradley Baetza1491de2000-07-08 12:50:26 +0000381 */
382BOOL VFWAPI DrawDibStop(HDRAWDIB hdd) {
383 FIXME("(0x%08lx), stub\n",(DWORD)hdd);
384 return TRUE;
385}
386
387/*************************************************************************
388 * DrawDibStop [MSVIDEO.119]
389 */
390BOOL16 DrawDibStop16(HDRAWDIB16 hdd) {
391 return DrawDibStop(hdd);
392}
393
394/***********************************************************************
Patrik Stridvall8b216b32001-06-19 18:20:47 +0000395 * DrawDibSetPalette [MSVFW32.@]
Bradley Baetza1491de2000-07-08 12:50:26 +0000396 */
397BOOL VFWAPI DrawDibSetPalette(HDRAWDIB hdd, HPALETTE hpal) {
398 WINE_HDD *whdd;
399
400 TRACE("(0x%08lx,0x%08lx)\n",(DWORD)hdd,(DWORD)hpal);
401
402 whdd = GlobalLock16(hdd);
403 whdd->hpal = hpal;
Vincent Béron9a624912002-05-31 23:06:46 +0000404
Bradley Baetza1491de2000-07-08 12:50:26 +0000405 if (whdd->begun) {
406 SelectPalette(whdd->hdc,hpal,0);
407 RealizePalette(whdd->hdc);
408 }
409 GlobalUnlock16(hdd);
410 return TRUE;
411}
412
413/***********************************************************************
414 * DrawDibSetPalette [MSVIDEO.110]
415 */
416BOOL16 VFWAPI DrawDibSetPalette16(HDRAWDIB16 hdd, HPALETTE16 hpal) {
417 return DrawDibSetPalette(hdd,hpal);
418}
419
420/***********************************************************************
Patrik Stridvall8b216b32001-06-19 18:20:47 +0000421 * DrawDibGetPalette [MSVFW32.@]
Bradley Baetza1491de2000-07-08 12:50:26 +0000422 */
423HPALETTE VFWAPI DrawDibGetPalette(HDRAWDIB hdd) {
424 WINE_HDD *whdd;
425 HPALETTE ret;
426
427 TRACE("(0x%08lx)\n",(DWORD)hdd);
428
429 whdd = GlobalLock16(hdd);
430 ret = whdd->hpal;
431 GlobalUnlock16(hdd);
432 return ret;
433}
434
435/***********************************************************************
Patrik Stridvall3ca98232001-06-20 23:03:14 +0000436 * DrawDibGetPalette [MSVIDEO.108]
Bradley Baetza1491de2000-07-08 12:50:26 +0000437 */
438HPALETTE16 VFWAPI DrawDibGetPalette16(HDRAWDIB16 hdd) {
439 return (HPALETTE16)DrawDibGetPalette(hdd);
440}
441
442/***********************************************************************
Patrik Stridvall8b216b32001-06-19 18:20:47 +0000443 * DrawDibRealize [MSVFW32.@]
Bradley Baetza1491de2000-07-08 12:50:26 +0000444 */
445UINT VFWAPI DrawDibRealize(HDRAWDIB hdd, HDC hdc, BOOL fBackground) {
446 WINE_HDD *whdd;
447 HPALETTE oldPal;
448 UINT ret = 0;
449
450 FIXME("(%d,0x%08lx,%d), stub\n",hdd,(DWORD)hdc,fBackground);
Vincent Béron9a624912002-05-31 23:06:46 +0000451
Bradley Baetza1491de2000-07-08 12:50:26 +0000452 whdd = GlobalLock16(hdd);
453
454 if (!whdd || !(whdd->begun)) {
455 ret = 0;
456 goto out;
457 }
Vincent Béron9a624912002-05-31 23:06:46 +0000458
Bradley Baetza1491de2000-07-08 12:50:26 +0000459 if (!whdd->hpal)
460 whdd->hpal = CreateHalftonePalette(hdc);
461
462 oldPal = SelectPalette(hdc,whdd->hpal,fBackground);
463 ret = RealizePalette(hdc);
Vincent Béron9a624912002-05-31 23:06:46 +0000464
Bradley Baetza1491de2000-07-08 12:50:26 +0000465 out:
466 GlobalUnlock16(hdd);
467
468 TRACE("=> %u\n",ret);
469 return ret;
470}
471
472/***********************************************************************
473 * DrawDibRealize [MSVIDEO.112]
474 */
475UINT16 VFWAPI DrawDibRealize16(HDRAWDIB16 hdd, HDC16 hdc, BOOL16 fBackground) {
476 return (UINT16)DrawDibRealize(hdd,hdc,fBackground);
477}