Click to See Complete Forum and Search --> : Resource compiling with Borland 5.5 & information <windows.h>
Fatboy
August 14th, 2004, 09:33 AM
How do I compile, for example, an icon into a program using the Borland 5.5? Cos it doesn't seem to work when I tried it with brc32.exe.
And by the way, where can I get a good insight of the header <windows.h>? You know, information about its functions, macros and stuff? I'm having trouble looking for it.
Mick
August 14th, 2004, 09:36 AM
How do I compile, for example, an icon into a program using the Borland 5.5? Cos it doesn't seem to work when I tried it with brc32.exe.
And by the way, where can I get a good insight of the header <windows.h>? You know, information about its functions, macros and stuff? I'm having trouble looking for it.
Can't help you with the borland compiler. But you can find the information on the windows api functions etc on:
msdn.microsoft.com
Mick
August 14th, 2004, 09:43 AM
You might also try using google and searchign for borland compiler c++ resource
etc...
http://apurvaslair.50g.com/cpp/compilers/borland.html
Fatboy
August 14th, 2004, 03:06 PM
Thank you!
Fatboy
August 14th, 2004, 06:13 PM
OK, this is the problem:
I have a .cpp file, two .ico files, a Resouce.h file and a .rc file. The .rc file only supplies an icon, which is what I'm trying to bind into my program. When I try to compile the .cpp without compiling the .rc file, it compiles. But the resulting .exe file is left without an icon. When I try to compile the .rc file using brc32.exe, it compiles smoothly. However, the .exe file still doesn't have an icon! Why?
Paul McKenzie
August 14th, 2004, 08:58 PM
What is the command-line that you used for the resource compiler (I guess for BC, the resource compiler is brc32.exe)?
If you don't specify to the resource compiler which EXE to bind to, it isn't going to do anything except create a .RES file.
Regards,
Paul McKenzie
Paul McKenzie
August 14th, 2004, 09:04 PM
And by the way, where can I get a good insight of the header
<windows.h>? You know, information about its functions, macros and stuff? I'm
having trouble looking for it.You mean you aren't using a book (Petzold,
for example) to learn Windows programming??
The <windows.h> is just a header that defines the Windows functions. It doesn't
tell you how to program in Windows, or how each function is related to each other
(let alone, event driven programming). For this, you need a book, or at the very
least, a tutorial on Windows programming in C or C++.
Regards,
Paul McKenzie
Mick
August 14th, 2004, 10:31 PM
The link I provided above should have a section on resource compling. In addition to a FAQ download, and a sample makefile download. Read it and follow the directions.
Fatboy
August 15th, 2004, 12:46 PM
Yeah! Tutorials on Windows programming is what I mean! I can't find any books or anything on the internet. Petzold did you say? What's that? How can I get it? I learnt basic C++ programming using the SAMS "Teach yourself C++ in 24 hours". Right now I'm reading SAMS "Teach yourself Game Programming in 24 hours", which has a bit of windows programming in it, but not much at all! Thanks Paul for the help!
I'm experiencing another problem with the Borland resource compiler. I created a Test.rc file, which says:
#include "resource.h"
IDI_TEST ICON "Test.ico"
IDI_TEST_SM ICON "Test_sm.ico"
But when I try to compile it using brc32.exe, it flags an error saying:
Invalid icon format.
But how could that be? What did I do wrong??????
Mick
August 15th, 2004, 01:40 PM
Where did you get the .ico files from? Can you open them up in an icon editor, or paint etc.
Fatboy
August 15th, 2004, 02:22 PM
I made the icons myself using the MS paint, one is 32*32 and the other is 16*16, precisely. And I can open them with paint or picture and fax viewer. And yes they are .ico files, I check in dos.......
Mick
August 15th, 2004, 03:59 PM
Did you convert or save the images as .ico's? .icos are a collection of images, not just a bitmap renamed to .ico. You can find shareware bitmap to ico conversion tools via a google search. Here is some older conversion source that should work fine, but then your having a problem building or that is your new to the enviroment so I tagged in the resulting .exe build.
Fatboy
August 15th, 2004, 05:10 PM
Thank you sooooooooooo much!!!!
Mick
August 15th, 2004, 05:15 PM
Thank you sooooooooooo much!!!!
No problem. I grabbed the borland compliler just in case you have more questions :D
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.