News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Problem with .rc

Started by Warmt, February 21, 2008, 05:37:16 PM

Previous topic - Next topic

Warmt

Hi guys.

At the moment I've got the following problem:

In my resource file (rsrc.rc) I've definied some bitmap buttons which I want to use in my program.
I defined them this way:

2000 BITMAP MOVEABLE PURE LOADONCALL DISCARDABLE "stuff\run_btn.bmp"
2001 BITMAP MOVEABLE PURE LOADONCALL DISCARDABLE "stuff\quit_btn.bmp"
2002 BITMAP MOVEABLE PURE LOADONCALL DISCARDABLE "stuff\info_btn.bmp"
2003 BITMAP MOVEABLE PURE LOADONCALL DISCARDABLE "stuff\music_btn.bmp"


Everything worked fine when I only had the last 3 buttons in my program (ID 2001 - 2003)
A few minutes ago I wanted to add one more (ID 2000).
However when I now compile my project (with the makeit.bat), I get the following error:

un_btn.bmp5): error RC2135 : file not found: stuff
CVTRES : fatal error CVT1101: cannot open rsrc.res for reading


Thats EXACTLY what it's showing.
Instead of "run_btn.bmp" it shows "un_btn.bmp" (without the "r").

Well, I'm more worried about why exactly it cannot find the file (even though its there too 100%
[the filename is the same as in the .rc (with the "r"]) than about the missing "r" of course.

Seeing that it works fine with the other .bmp's I'd like to know why exactly masm gives me this error.

Could anyone please help?

ragdog

hi

try this i hope its helps you


5000  BITMAP    DISCARDABLE "Res/logo.bmp"

res is your folder to add the bitmaps

and show your slash signs

stuff\music_btn.bmp to stuff/music_btn.bmp

greets

ToutEnMasm

Special path notation for rc files
2000 BITMAP MOVEABLE PURE LOADONCALL DISCARDABLE "stuff\\run_btn.bmp"
and all is good

Warmt

Thats odd now..

added
5000 BITMAP DISCARDABLE "stuff/run_btn.bmp"
to the .rc file, compiled, and it worked.

Then I changed the line again to:
2000 BITMAP MOVEABLE PURE LOADONCALL DISCARDABLE "stuff\run_btn.bmp"
compiled, and it worked..

asm can be really weird sometimes ;)

btw, the slash signs ( / or \ ) doesnt seem to matter at all, since they also worked
on the other .bmps.

Anyway, it works now, thanks for your help, ragdog, I really appreciate it.

Also thanks for your tip, ToutEnMasm. I'll keep that in mind if the same thing happens again.

GregL

The reason is that .rc files use C syntax.


Tedd

\r \n \t \a \b ... all have special meanings. Using \\ has the special meaning of the \ character, or just use / which seems to work just as well.
No snowflake in an avalanche feels responsible.

Warmt

Thanks for your help guys.

I suppose this topic can be closed now.