Thread: Resource Files

  1. #1
    Unregistered
    Guest

    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.

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    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.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    Unregistered
    Guest
    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.

  4. #4
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    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.
    Monday - what a way to spend a seventh of your life

  5. #5
    Unregistered
    Guest

    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?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 03:30 PM
  2. Resource Files....
    By gcn_zelda in forum Windows Programming
    Replies: 2
    Last Post: 12-13-2003, 03:02 PM
  3. I Need To Know Some Things That I Can Put Into A Batch File
    By TheRealNapster in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 10-20-2003, 08:12 PM
  4. Multiple Resource files
    By doodlak in forum C++ Programming
    Replies: 0
    Last Post: 07-04-2002, 06:13 PM
  5. reinserting htm files into chm help files
    By verb in forum Windows Programming
    Replies: 0
    Last Post: 02-15-2002, 09:35 AM