PDA

Click to See Complete Forum and Search --> : Putting a .bmp on a button and playing a MP3


Nov 13th, 2000, 10:11 AM
How do i put a .bmp onto a button? And how do i play MP3 files?

Vlatko
Nov 13th, 2000, 12:19 PM
To put an icon on a button check the button's bitmap check box and thn add this code

HBITMAP hBit = (HBITMAP)LoadImage(NULL,"C:\\windows\\bubbles.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE);
butt1.SetBitmap (hBit); //butt1 is the var for
//This is for MFC only

Nov 13th, 2000, 01:35 PM
Here is a zip file (http://www.planetsourcecode.com/xq/ASP/txtCodeId.372/lngWId.3/qx/vb/scripts/ShowCode.htm) that says how to decode and play MP3 files without using any DLL's


BTW, to make a button have a pic on it, you would have to use te GetDC API on the hWnd of a button, then BitBlt the pic onto it...

[Edited by denniswrenn on 11-13-2000 at 02:39 PM]

Nov 13th, 2000, 03:57 PM
Vlatko, im not using MFC.
Dennis, thanks ill check it out.