gdiplus: Implemented GdipCreateBitmapFromResource.

This commit is contained in:
Nikolay Sivov 2008-07-12 00:43:50 +04:00 committed by Alexandre Julliard
parent 90a6fb047e
commit d8a25fc26c
3 changed files with 22 additions and 1 deletions

View File

@ -77,7 +77,7 @@
@ stdcall GdipCreateBitmapFromGraphics(long long ptr ptr)
@ stdcall GdipCreateBitmapFromHBITMAP(long long ptr)
@ stub GdipCreateBitmapFromHICON
@ stub GdipCreateBitmapFromResource
@ stdcall GdipCreateBitmapFromResource(long wstr ptr)
@ stdcall GdipCreateBitmapFromScan0(long long long long ptr ptr)
@ stdcall GdipCreateBitmapFromStream(ptr ptr)
@ stdcall GdipCreateBitmapFromStreamICM(ptr ptr)

View File

@ -318,6 +318,26 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromFileICM(GDIPCONST WCHAR* filename,
return GdipCreateBitmapFromFile(filename, bitmap);
}
GpStatus WINGDIPAPI GdipCreateBitmapFromResource(HINSTANCE hInstance,
GDIPCONST WCHAR* lpBitmapName, GpBitmap** bitmap)
{
HBITMAP hbm;
GpStatus stat = InvalidParameter;
if(!lpBitmapName || !bitmap)
return InvalidParameter;
/* load DIB */
hbm = (HBITMAP)LoadImageW(hInstance,lpBitmapName,IMAGE_BITMAP,0,0,LR_CREATEDIBSECTION);
if(hbm){
stat = GdipCreateBitmapFromHBITMAP(hbm, NULL, bitmap);
DeleteObject(hbm);
}
return stat;
}
GpStatus WINGDIPAPI GdipCreateHBITMAPFromBitmap(GpBitmap* bitmap,
HBITMAP* hbmReturn, ARGB background)
{

View File

@ -336,6 +336,7 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromFile(GDIPCONST WCHAR*,GpBitmap**);
GpStatus WINGDIPAPI GdipCreateBitmapFromFileICM(GDIPCONST WCHAR*,GpBitmap**);
GpStatus WINGDIPAPI GdipCreateBitmapFromGdiDib(GDIPCONST BITMAPINFO*,VOID*,GpBitmap**);
GpStatus WINGDIPAPI GdipCreateBitmapFromGraphics(INT,INT,GpGraphics*,GpBitmap**);
GpStatus WINGDIPAPI GdipCreateBitmapFromResource(HINSTANCE,GDIPCONST WCHAR*,GpBitmap**);
GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT,INT,INT,PixelFormat,BYTE*,
GpBitmap**);
GpStatus WINGDIPAPI GdipCreateBitmapFromStream(IStream*,GpBitmap**);