.RC Files
I am starting Windows programming for the first time and I am presently using Visual C++ version 5.0. The program I am trying to write needs a menu bar at the top, and when I write a .RC script, how do I incorporate that into my program? Do I attach it to my Workspace, or must i compile it first with RC.exe, (I cannot figure out how RC.exe works either) So any input you can give me would be greatly welcomed.
Also does any one know where any decent Beginning Tutorials on Windows 95/98 programming would be?
Thanks
-The_Kyer
I think .rc are mainly for MFC programming, which is not good
(you can find me on IRC : #opengl on undernet)
quote:
I think .rc are mainly for MFC programming, which is not good
This is an absurd statement. How can you bash something if you don''t know what it is??!?
Cecil,
You can add the .rc file into your project and it will be built automagically for you. You will need to reference the resource header file in order to use any indentifiers.
Add the file to your project, just like adding any other file (Project / Add to Project / Files ...)
__________________________________________
Yeah, sure... we are laughing WITH you ...
Yeah, sure... we are laughing WITH you ...
I used resource files to store the texture and sound data for Disasteroids 3D and it works pretty well.
If you''re looking for an example of how to load textures, download the source from my site, www.LMNOpc.com and check out the code in the LoadGLTextures function.
I have to admit that Jeff sent me the code to load the textures from resource files, so thank him.
I stole the sound-loading code straight from the DirectX SDK, so in other words, I don''t know anything about loading anything from resource files, but I CAN cut and paste
Good luck!
If you''re looking for an example of how to load textures, download the source from my site, www.LMNOpc.com and check out the code in the LoadGLTextures function.
I have to admit that Jeff sent me the code to load the textures from resource files, so thank him.
I stole the sound-loading code straight from the DirectX SDK, so in other words, I don''t know anything about loading anything from resource files, but I CAN cut and paste
Good luck!
ThomWwww.LMNOpc.com
quote: Original post by SKSlayer
I think .rc are mainly for MFC programming, which is not good
Actually good old Win32 coding uses .rc files. The .rc file is a Resource file which is linked to your .exe These resources can be dialogs, bmp's, ico's, text or just about anything.
You can do some interesting things with these .rc files! Such as create a resource .dll which contains bmp's and text or, as I stated above, just about anything!
So, an .rc file isn't stricly for use with MFC. As for MFC not being good.... I would suggest using MFC over straight Win32 programming for business apps (yes I would use VC++ and MFC over VB for this type of work). But for game programming MFC is off limits!!! Builder++ is very useful for creating tools for games, I went out and bought a personal copy of this and have had very good success with it. I like being able to drag and drop my GUI and then write C++ code underneath the GUI. It's like VB on C++ (read "Steroids")
To summerize:
.rc files are not evil.
MFC is OK.
Builder++ is OK.
David "Dak Lozar" Loeser
Edited by - Dak Lozar on June 9, 2000 12:08:54 PM
Dave Dak Lozar Loeser
"Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning."--anonymous
"Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning."--anonymous
.RC''s are used for BOTH Win32 and MFC apps. They describe the contents of the resources.. ie: dialog descriptions, icons, bitmaps, etc.
They are extremely important if you want to make a demo or intro and you DON''T want to include all your graphics and sound as separate files. There are methods in include your own types of data as resources (and thusly they are saved in your .RC) and then read them in from resources similarly to reading them in from files on disk.
PS..
MFC is great.
They are extremely important if you want to make a demo or intro and you DON''T want to include all your graphics and sound as separate files. There are methods in include your own types of data as resources (and thusly they are saved in your .RC) and then read them in from resources similarly to reading them in from files on disk.
PS..
MFC is great.
This Space Left Blank
June 09, 2000 11:41 AM
Well, I suppose I should get in on this flaming...
MFC is not bad. Worms 2 and Worms Armageddon were programmed with MFC. (Bet you didn''t know that!!)
RC''s are great. I used them in the screensaver I just wrote. All sound effects, images, etc. are all encapsulated in the program file! It''s great.
As to how you include a menu: First, you add a menu resource to your resource script. Then, when you call CreateWindow(), the third-to-last parameter should be something like this:
LoadMenu( hInstance, MAKEINTRESOURCE( IDR_MENU ) )
I think that should do it, although I haven''t tried it myself recently.
lntakitopi@aol.com | http://geocities.com/guanajam/
MFC is not bad. Worms 2 and Worms Armageddon were programmed with MFC. (Bet you didn''t know that!!)
RC''s are great. I used them in the screensaver I just wrote. All sound effects, images, etc. are all encapsulated in the program file! It''s great.
As to how you include a menu: First, you add a menu resource to your resource script. Then, when you call CreateWindow(), the third-to-last parameter should be something like this:
LoadMenu( hInstance, MAKEINTRESOURCE( IDR_MENU ) )
I think that should do it, although I haven''t tried it myself recently.
lntakitopi@aol.com | http://geocities.com/guanajam/
That was me... hold on a second, if I wasn''t registered, how''d it get my signature?!?!?
lntakitopi@aol.com | http://geocities.com/guanajam/
lntakitopi@aol.com | http://geocities.com/guanajam/
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement