Loading of *.gif or *.jpeg files in VC++ controls
-
Hi, How can load *.gif or *.jpeg files on a dialog or a button, if i can please tell how it is . Thank U very much.:(
you cannot use GIF without a license (in the US, Germany, UK, Japan, etc.). if you want to load JPG, there are articles on this site (see the Bitmap and Palettes section). or you could try a 3-rd party toolkit, like ImgSource. -c ------------------------------ Smaller Animals Software, Inc. http://www.smalleranimals.com
-
Hi, How can load *.gif or *.jpeg files on a dialog or a button, if i can please tell how it is . Thank U very much.:(
-
Try use function OleLoadPicturePath According to documentation: The stream must be in BMP (bitmap), JPEG, WMF (metafile), ICO (icon) or GIF format
Here you go. You have to declare some CBitmapButton objects for each button in your main class header file that you are using this buttons. Then add the usually message handlers. Load your bitmap picture in your resource bitmap and use a string name "Name" to label your bitmap that you want over your button. Then that should be the same name as the caption on your button. Make sure you have owner draw button checked. Add a OnInitDlg member function and call your CBitmapButton objects with autoload. Compile and run and you should have your bitmap buttons.