-
Resource Files
I was just looking at a Windows programming example in VC++. Then I saw a "resource file". I looked in it and found some "visual" components that the program used. I thought you programmed in the visual part of a Windows program? Am I wrong? I thought that menu (for example) was programmed by hand. How are these visual components made? Thanks.
-
This should really be posted to the Windows board.
Things like menus and dialogs are commonly loaded from a resource file. You can use any text editor to build a resource file, since they are simply text. More commonly, resource files are built with a resource editor. If you are using VC++ then the IDE has a visual menu, (etc.), builder, built in. Look at the Insert->Resource menu option.
-
So, you really DON'T program in the visual aspect of Windows programs? You do it by hand and then include the resource file? I guess I don't really understand. Then you were talking about "writing" the component in a text editor. So, you DO program the visual (windows, menu, dialogs, etc.) parts of a Windows application? I'm confused. Thanks for your reply.
-
there are several ways of doing it and each prgrammer has their own preference. But say you wanted to include a simple menu in your win32 app.
define it an rc file well call it menu.rc
in that file the description of the menu appears
you then include that menu.rc in your windows program by calling USERC("mymenu.rc");
this will then inlucde the resource code, it makes the code neater.
A good book that explains this is Windows 98 programming from the ground up"
by Herbert Schildt.
-
Resource File
So, let me get this straight. You can create a resource file in any text-editor. And the you compile it into a .rc file (how do you compile it?). And then you can include the "control" into the program and work with it. Is this right? So, the resource file that you create in the text-editor is, apparently, pure code that you write to create this control, right?