gdiplus: Implemented GdipCreateBitmapFromResource.
This commit is contained in:
parent
90a6fb047e
commit
d8a25fc26c
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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**);
|
||||
|
|
Loading…
Reference in New Issue