Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!midway!ellis.uchicago.edu!lair From: lair@ellis.uchicago.edu (scott allen laird) Newsgroups: comp.os.msdos.programmer Subject: Re: Borland C++ 2.0 Message-ID: <1991Feb16.035918.22264@midway.uchicago.edu> Date: 16 Feb 91 03:59:18 GMT References: <1991Feb14.151804.6890@athena.mit.edu> <1991Feb14.204813.26432@spool.cs.wisc.edu> Sender: news@midway.uchicago.edu (News Administrator) Organization: University of Chicago Lines: 55 In article <1991Feb14.204813.26432@spool.cs.wisc.edu> so@brownie.cs.wisc.edu (Bryan S. So) writes: [Much information on the introduction of Borland C++ and the windows utilities it includes and a few other things deleted] >I don't really know what a resource compiler is, can somebody >explain? > >(By the way, they don't call it Turbo any more. It is now > called Borland C++. And it is bundled with Profiler/Assembler/ > Debugger, so there is no Pro package avail.) > > >Bryan So > The resource compiler is a utility that compiles resources such as icons, menus dialog boxes, and other "resources" that Windows uses into the .exe file. According to the SDK manual for Windows 2.xx (MS wants more to upgrade than Borland wants for the student edition of Borland C++, and I'm just a poor student that got a really good deal on the SDK...) you must define your resources in a resource script file (usually having a .rc extension), and then use the resource compiler to compile them into your .exe file. The resources themselves can either be hard-coded into the source itself, or put into the resource file. Generally, the resource file is the easier method, since you can simply include a line such as mycursor CURSOR mycursor.cur to define a cursor found in the bitmap file mycursor.cur, instead of hard- coding the bitmap into the source with an array. The resource compiler also allows you to re-compile the resource portion of a file without re-compiling the code, saving quite a bit of effort, as you can tell by the sample times Borland gave. The resource file is also the recommended meathod of including the text i application, since a string can be included just as easily as an icon. Microsoft states that this makes translating to other languages easier, since all the translator's work is in one file, and the source doesn't have to be included. I'm sure someone who is an experienced Windows programmer could give a much better (and up to date) explanation, but this should give you the general idea. For an example, look at any of the windows applications on cica.cica.indiana.edu or simtel that contain soruce code, and examine the .rc file. You may also consider asking the "experts" in comp.windows.ms.programmer, since I'm reasonably sure they could help. -- Scott A. Laird | Any semblance of the above to anything is purely lair@midway.uchicago.edu | coincidental, as it was the result of an infinite The University of Chicago | number of monkeys sneaking in to use my computer | for the afternoon.