Hi all. This is my first time posting here, though I have been coming to this site for a few months on and off. I'm currently working on Tut 10 example 1, and I can't get the code to run properly.
The code assembles fine, but when I run it (masm 6.14 | win2000 PE) nothing happens, but the process is listed under the task manager.
I suspected it was something I missed, so I cut and paste the code & rc file and the same thing happend. Has this happend to anyone else? Is it just me? Is there something wrong with the code? Is there anything else to eat in my house besides ramen noodles?

Thanks all,
lackluster
Posted on 2001-09-30 12:23:03 by lackluster
The same thing happend with the second example also......
Posted on 2001-09-30 13:01:37 by lackluster
did you try re-building Iczelion's samples and they failed?
Or did you copy & paste and your copy failed?
Cos i had lots of similar problems when i played with those tuts..
It's very easy to screw them :)
Posted on 2001-09-30 13:11:42 by latigo
Yeah, I downloaded the .zip files and tried to build them and the same thing happend.
Posted on 2001-09-30 16:24:34 by lackluster
Im not positive, but i think Ic's Tut 10 is the first time your introduced to .rc files.

The entire dialog box is designed with and .rc script outlining the placement of the controls, and their type.

This .rc file needs to be "Compiled" into an .obj file as well!! If you dont, the program will build and link.. but when ran, you wont get anything, because the process can't find the resource, assumed to be linked within the .exe.

Another thing is the standard compile batch file (build.bat) doesnt compile resources explicitly. You need to either modify your own batch file to include resources, or use the included (builda.bat) (( Build All ~ found in the \bin\ dir.)).

Builda.bat will compile a resource file named "rsrc.rc" No exceptions. Iczelion's examples however (if i remember) dont follow this standard, and may have the name "tut10.rc" instead. If this is the case, you need to rename it to "rsrc.rc" to use it with the builda.bat.

More about RC compiling.

RC.exe actually compiles resource scripts (*.rc), and is found in your bin dir. It performs the same job as ML.exe does for *.asm files. In the end they both produce *.obj files. *.obj files are what the LINKER uses to pull all the fragrments together into one final exe file.

So build all will call: ml.exe (*.asm files), rc.exe (rsrc.rc), and Link (*.obj) ==== 1 exe output!


So make sure you can find a rsrc.obj file after you run the builda.bat. If you have this in the dir, and the program is still not working, i dont know what it is.. but im pretty sure this is your problem. After all, if it doenst have the "window" design compiled into the program, how is it to show you anything?? :)

NaN
Posted on 2001-09-30 16:46:00 by NaN
That's exactly what the problem was. Thanks for the help, I hope I can return the favor someday.
Posted on 2001-09-30 21:39:35 by lackluster
Glad to help...

NaN
Posted on 2001-10-01 02:51:28 by NaN
Hi,
i'm programming in assembly for about two years, now, and I always linked my .res file with the .obj file of the compiled asm file. it always worked for me.

NOP-erator
Posted on 2001-10-01 03:41:32 by NOP-erator
Hutch talked about this on another thread somewhere on this board... (not going to look for it, i remember the point).

Basically, as Hutch described it, the .res CAN be linked as you say you always do, with out a rsrs.obj file. But the thing is, when you give the LINKER a .RES file, it (behind the scenes) calles RC.exe and build the rsrc.obj anyways, and links with that.

So as hutch pointed out, its advantageous to use RC.exe as you can control what switches you want to compile with. If you trust it to the linker, you get the 'default' compile of your rsrc.res file.

I personally never use .res (cant think of one time i did).

Hope this clears things up a bit..

NaN
Posted on 2001-10-01 03:48:46 by NaN
ok, i got the point! thank you NaN.

NOP-erator
Posted on 2001-10-01 03:57:13 by NOP-erator