PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Renaming resource.h?

This is a bit of an MSDEV question.

Normally, MSDEV maintains a header file named resource.h, for Windows resources.

I normally don't use Windows resources. In my own code, I would like to have a file named resource.h. But then this would conflict.

I could give my file a different name. But I'd rather name my file resource.h, and rename the MSDEV file to something else like winresource.h.

Is there any danger to doing this? Will MSDEV get confused?
If you don't have any resources then it shouldn't be a problem, you shouldn't have that header (and the *.rc file). You can delete it from the workspace and then use the file however you want.

But I think you are using resources and usually will have to use one at least, the program icon. In that case you'd be better off not using that name for a file or creating another folder for your source files.

I generally have a folder for all of the output and misc files that VC & eVC create like the resource.h and everything else (all of my sourcefiles) I have seperate folders for those.
I wouldn't put money on it, but I don't think MS dev tools (any of them) assign any specific meaning to the filename resource.h. It's just a collection of defines, I don't think it's filename matters. I think it's just it's default name... I *think* you could call it whatever you want, and your resources would still be compiled properly (resource.rc might be a different story though, I think that may have to be named that way, but I also don't think that's relevant here). Hence, if that's all true, then you should be able to drop your own header with that filename in and use it for whatever you want without any trouble.

* Disclaimer: I might be grossly wrong! :)