Solved

256 color images in C++Builder

Posted on 1998-05-06
2
252 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
Comment Utility
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
Comment Utility
Thank you very much. You helped me a lot.

Adam.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now