Solved

256 color images in C++Builder

Posted on 1998-05-06
2
254 Views
Last Modified: 2010-04-10
   I want to put a 256-color image into a resource file using the Image Editor. When I close it, and then open it again the image is uncolored - it appears like it has 16 colors. Maybe you know a better resource editor?

By the way, how to put an avi animation into an resource file?
0
Comment
Question by:procer
2 Comments
 
LVL 5

Accepted Solution

by:
inter earned 100 total points
ID: 1173549
Hi,
to do the first one the good old Borland's Resource Workshop is my favorite. But if you do not have that you can do it by hand as follows:

Say you have bitmap1.bmp and bitmap2.bmp you want to add your project

prepare a text file called mybitmap.rc and write in:

101 BITMAP "C:\<path to bitmaps>\bitmap1.bmp"
102 BITMAP "C:\<path to bitmaps>\bitmap2.bmp"
etc..
then from dos run the brcc32 (which will be in your bin directory, if there is no path to there write C:\program files\borland\bc3\bin\brcc32 e.g.)
brcc mybitmap.rc
this will create mybitmap.res having 101 and 102 points to your bitmaps. Then add it to your resource statements.

Regarding the 2nd question, I do it as follows:(I do not know how to do as above)
1 - Select the avi file to include
2 - create a custom resource type called AVI (or anything) add the resource from file
3 - Recompile the res
4 - Load the file play it from the resource.
But the above solution may work by just adding
100 AVI1 "c:\myclip.avi"
but I am not sure
Regards,
Igor
0
 

Author Comment

by:procer
ID: 1173550
Thank you very much. You helped me a lot.

Adam.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question