Results 1 to 3 of 3

Thread: Embeding a resource (namely a swf) in a VC++ executable?

  1. #1
    Constant Bitrate
    Join Date
    May 2002
    Location
    Gorge of eternal peril
    Posts
    134

    Embeding a resource (namely a swf) in a VC++ executable?

    I have the code (from that one flash tutorial listed by Gutter) to do this in VB, but that code doesnt really help my situation. Does anyone know how to do this in a VC++ project?
    '03 BMW M3 6 spd.
    Black/Imola Red
    19's

    Shuttle XPC w/ AMD 1800+
    Opus 150w
    Lilliput 7"
    Wireless internet through my P900 and bluetooth

  2. #2
    FLAC Gutter's Avatar
    Join Date
    Dec 1999
    Location
    Casina, Italy
    Posts
    901
    It's honestly quite pointless to put it into a resource file. The application just creates that file in the app's directory and uses that. I'm not sure what the purpose is.

    I suggest forgetting the resource file and just read it directly from your directory. Or is that what you're having problems doing?

  3. #3
    Constant Bitrate
    Join Date
    May 2002
    Location
    Gorge of eternal peril
    Posts
    134
    Well it is supposed to be embeded into the executable, when you compile the .rc file, you get an .res file. This is not needed upon release, because it will be later linked with the .o files. Its like compiling c/c++ code on a *NIX command line.

    gcc -c file1.c
    gcc -c file2.c

    (output is 2 files, file1.o and file2.o)

    Then you link the .o files with

    gcc -o appname file1.o file2.o

    So in other words, if you did what that tutorial said, you can actually not use that .res file after it is compiled and linked into the executable. Im not sure if this works the same with VB, but with VC++, Im sure of this. All the bitmaps, icons, etc that you put in your project are linked into your executable, so when you distribute your program, you dont need to distribute the .res files. But anyway, I was just intrested to know how to do this for the hell of it, no real reason. Im one of those guys who has 456189 project dirs on his comp testing every possible function or feature of c/c++ lol.
    '03 BMW M3 6 spd.
    Black/Imola Red
    19's

    Shuttle XPC w/ AMD 1800+
    Opus 150w
    Lilliput 7"
    Wireless internet through my P900 and bluetooth

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •