Commit 1dcf51f0 authored by Charles Davis's avatar Charles Davis Committed by Alexandre Julliard

winemac.drv: Move create_bitmap_from_dib() above the import/export functions.

parent a313c9b7
......@@ -616,6 +616,36 @@ static HGLOBAL create_dib_from_bitmap(HBITMAP hBmp)
/**************************************************************************
* create_bitmap_from_dib
*
* Given a packed DIB, creates a bitmap object from it.
*/
static HANDLE create_bitmap_from_dib(HANDLE dib)
{
HANDLE ret = 0;
BITMAPINFO *bmi;
if (dib && (bmi = GlobalLock(dib)))
{
HDC hdc;
unsigned int offset;
hdc = GetDC(NULL);
offset = bitmap_info_size(bmi, DIB_RGB_COLORS);
ret = CreateDIBitmap(hdc, &bmi->bmiHeader, CBM_INIT, (LPBYTE)bmi + offset,
bmi, DIB_RGB_COLORS);
GlobalUnlock(dib);
ReleaseDC(NULL, hdc);
}
return ret;
}
/**************************************************************************
* import_clipboard_data
*
* Generic import clipboard data routine.
......@@ -651,36 +681,6 @@ static HANDLE import_clipboard_data(CFDataRef data)
/**************************************************************************
* create_bitmap_from_dib
*
* Given a packed DIB, creates a bitmap object from it.
*/
static HANDLE create_bitmap_from_dib(HANDLE dib)
{
HANDLE ret = 0;
BITMAPINFO *bmi;
if (dib && (bmi = GlobalLock(dib)))
{
HDC hdc;
unsigned int offset;
hdc = GetDC(NULL);
offset = bitmap_info_size(bmi, DIB_RGB_COLORS);
ret = CreateDIBitmap(hdc, &bmi->bmiHeader, CBM_INIT, (LPBYTE)bmi + offset,
bmi, DIB_RGB_COLORS);
GlobalUnlock(dib);
ReleaseDC(NULL, hdc);
}
return ret;
}
/**************************************************************************
* import_bmp_to_bitmap
*
* Import BMP data, converting to CF_BITMAP format.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment