Draw HBITMAP on window control. Only in version 2.00 and above.
__stdcall W_DECLSPEC int zplay_DrawBitmapToHWND(ZPLAY_HANDLE handle, void * hwnd, int X, int Y, int Width, int Height, void * hBitmap);
Parameters |
Description |
ZPLAY_HANDLE handle |
ZPLAY handle. Get this handle with zplay_CreateZPlay. |
void * hwnd |
Window handle, identifies the window. |
int X |
Specifies the logical x-coordinate of the upper-left corner of the destination rectangle. |
int Y |
Specifies the logical y-coordinate of the upper-left corner of the destination rectangle. |
int Width |
Specifies the logical width of the destination rectangle. If this value is 0, function will use original width of specified bitmap. |
int Height |
Specifies the logical height of the destination rectangle. If this value is 0, function will use original height of specified bitmap. |
void * hBitmap |
Bitmap handle to draw. |
Return Values |
Description |
1 |
All OK. |
0 |
Error. To get error message read here. |
This function is using StretchBlt API to draw HBITMAP on screen. If you set Width and Height to 0, function will use width and height of hBitmap to determine drawing area. If you specify your own width and height, function will stretch hBitmap to specified dimensions.
Load ID3 info from current stream and draw picture on screen.
TID3InfoEx id3_info; if(instance->LoadID3Ex(&id3_info, 1)) { if(id3_info.Picture.CanDrawPicture) instance->DrawBitmapToHWND(NULL, 0, 0, 0, 0, id3_info.Picture.hBitmap); else { // can't decode attached image to hBitmap, use PictureData and PictureDataSize // to decode this format by your own image decoder } }
Copyright (c) 2010. Zoran Cindori - All rights reserved.
Web: http://libzplay.sourceforge.net/ Email: zcindori@inet.hr |