| View previous topic :: View next topic |
| Author |
Message |
manc Grandmaster Cheater
Reputation: 1
Joined: 16 Jun 2006 Posts: 551
|
Posted: Sat Jul 19, 2008 7:39 pm Post subject: [C++] .rc Help |
|
|
Forget about all the red stuff, how do you include resource scripts (.rc) to your source file? (The one circled in green)
Thanks for your help.
_________________
Last edited by manc on Sat Jul 19, 2008 8:04 pm; edited 1 time in total |
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Sat Jul 19, 2008 7:50 pm Post subject: |
|
|
| Code: |
#include "resource.h"
|
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
Last edited by oib111 on Sat Jul 19, 2008 7:51 pm; edited 1 time in total |
|
| Back to top |
|
 |
Jaak Expert Cheater
Reputation: 0
Joined: 02 Jul 2008 Posts: 176
|
Posted: Sat Jul 19, 2008 7:51 pm Post subject: |
|
|
| Does the file need to be in like the same folder or directory as with the compiler. OR, Doesn't it have to be in the folder with the rest of your project?
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Sat Jul 19, 2008 7:52 pm Post subject: |
|
|
Rest of your project.
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
manc Grandmaster Cheater
Reputation: 1
Joined: 16 Jun 2006 Posts: 551
|
Posted: Sat Jul 19, 2008 8:05 pm Post subject: |
|
|
| oib111 wrote: | | Code: |
#include "resource.h"
|
|
heh, Thanks. Simple syntax mistake =]
*edited first post incase no one noticed, How do you add resource scripts into the source code?
_________________
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Sat Jul 19, 2008 8:31 pm Post subject: |
|
|
You don't. You just include the .h file. So it would be like.
.h file
| Code: |
//extra line so no unexpected EOF
//bla
|
.rc file
| Code: |
//extra line so no unexpected EOF
include "resource.h"
//bla
|
main.cpp
| Code: |
include "resource.h"
|
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8589 Location: 127.0.0.1
|
Posted: Sun Jul 20, 2008 11:10 am Post subject: |
|
|
Read up one this article as well:
http://msdn.microsoft.com/en-us/library/36k2cdd4(VS.80).aspx
It will explain the difference between using < > and " " when including files.
_________________
- Retired. |
|
| Back to top |
|
 |
Heartless I post too much
Reputation: 0
Joined: 03 Dec 2006 Posts: 2436
|
Posted: Sun Jul 20, 2008 1:48 pm Post subject: |
|
|
Your not suppose to include the resource (.rc), you are suppose to include the header for it (.h). So it wold look something like this...
| Code: |
#include "resource.h"
// not #include <resource>
... |
_________________
What dosen't kill you, usually does the second time. |
|
| Back to top |
|
 |
|