• Welcome to Valhalla Legends Archive.
 

Resources

Started by brew, July 18, 2007, 04:11 PM

Previous topic - Next topic

brew

Okay, how do I use a resources from a resource file? (especially icons) It seems no matter what I do, it just doesn't work. I've made the resource.h file, (named specifically that), and defined the resources like this:

#define IDI_ICON 1001
#define IDI_ICONSMALL 1002

where the constant's names match the names of the resources within the resource file.
Then i included that .h file in my other file, and when registering the window class just used those names for the icons. (IDI_ICON, IDI_ICONSMALL, etc) You'd think that would work right? Well it DOESNT. I'm so frustruated right now, can anyone help me? Also it's now giving me some gay error that there's an "unexpected end of the file" for my .rc file. This is just total bullshit, I feel like MS is doing this to me (and maybe other people) on purpose. I've even checked the example hello world window that is included with VC++ and it does nothing different. This is completely pissing me off, (about how it doesnt work for just me) and I don't get what i'm doing wrong. can anyone help??
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

l2k-Shadow

Can you post the link to your project?

the unexpected end of file is probably you not including the precompiled header file (stdafx.h). you can turn mandatory including of that file in your VC++ project settings. the unrecognizing of the constants might be due to the unexpected end of file error as well.
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

brew

Ah nevermind my problem was that i didn't know VC++ makes a resource.h file by itself, and i made one (which overwrote it) and apparently the .rc file reads something from the resource.h file? that would make it give the error. Anyways I figured out what i'm doing wrong, but not quite. When I use the constants in resource.h (created automatically btw) it makes a question mark icon instead of what i want (the one i included as an icon....) I don't think stdafx.h has anything to do with it by the way (i started from a blank project and just never included it). This is complete bullshit, I'm getting tired of struggling with some gay icon. :l
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

Yegg

Don't give up on that icon, it's actually quite easy once you get the hang of it.

Question: Why not get into .NET?

brew

Quote from: Yegg on July 18, 2007, 10:03 PM
Question: Why not get into .NET?
I had a bad childhood experience with .NET
and it's slow

I think I got the icon, I made it a numerical resource name and that (kinda) worked, it shows up in the tray icon and the taskbar icon, but it just doesn't show up on the application bar of the window for some reason also winsock2.h is giving me a bunch of crap, it says i have 58 errors and 11 warnings, and without defining it, it says two functions are undeclared identifiers (even though i think it's included in windows.h) god help me .... :(
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

Yegg

.NET isn't that slow. Besides, software should be concerned more with productivity as opposed to raw speed. Unless you're developing some kind of high performance interpreter, some compiler, or another software which should have absolute speed, which I know you aren't, productivity should be more important.

l2k-Shadow

Quote from: brew on July 18, 2007, 10:39 PM
I think I got the icon, I made it a numerical resource name and that (kinda) worked, it shows up in the tray icon and the taskbar icon, but it just doesn't show up on the application bar of the window for some reason also winsock2.h is giving me a bunch of crap, it says i have 58 errors and 11 warnings, and without defining it, it says two functions are undeclared identifiers (even though i think it's included in windows.h) god help me .... :(

lol man seriously try searching some tuts before attempting to code something like winsock.

include WS2_32.lib in your project.
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

brew

Quote from: l2k-Shadow on July 19, 2007, 12:33 AM
Quote from: brew on July 18, 2007, 10:39 PM
I think I got the icon, I made it a numerical resource name and that (kinda) worked, it shows up in the tray icon and the taskbar icon, but it just doesn't show up on the application bar of the window for some reason also winsock2.h is giving me a bunch of crap, it says i have 58 errors and 11 warnings, and without defining it, it says two functions are undeclared identifiers (even though i think it's included in windows.h) god help me .... :(

lol man seriously try searching some tuts before attempting to code something like winsock.

include WS2_32.lib in your project.

And how would i do that? I tried #pragma comment (lib, "WS2_32.LIB") but it gave me the same thing. As for actually adding it to the source files of your project... i've never heard of anyone having to do that, or even saw anyone doing that for a winsock connection.
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

Yegg

I haven't used VC++ in ages, but the IDE does have a feature for adding files to the project. Add the WS2_32.lib file to your project. It's no special task; it's very simple.

brew

Quote from: Yegg on July 19, 2007, 11:25 AM
I haven't used VC++ in ages, but the IDE does have a feature for adding files to the project. Add the WS2_32.lib file to your project. It's no special task; it's very simple.

How do I include it in my project? Its obviouly somewhere in the Insert menu item, but where...? in Include text file it doesn't even show .lib files as an option, and the only other things are resources..... not so simple, huh
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

Yegg

Quote from: brew on July 19, 2007, 12:55 PM
Quote from: Yegg on July 19, 2007, 11:25 AM
I haven't used VC++ in ages, but the IDE does have a feature for adding files to the project. Add the WS2_32.lib file to your project. It's no special task; it's very simple.

How do I include it in my project? Its obviouly somewhere in the Insert menu item, but where...? in Include text file it doesn't even show .lib files as an option, and the only other things are resources..... not so simple, huh

Which software are you using?

brew

<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

Yegg

Quote from: brew on July 19, 2007, 02:47 PM
visual c++...

Way to go fucking genius!? There's more than one version, idiot.

If you're using VC++ 6, then go to Project > Add to Project > Files... and add the WS2_32.lib file.


brew

Quote from: Yegg on July 19, 2007, 03:23 PM
Quote from: brew on July 19, 2007, 02:47 PM
visual c++...

Way to go fucking genius!? There's more than one version, idiot.

If you're using VC++ 6, then go to Project > Add to Project > Files... and add the WS2_32.lib file.



"hyyyy im yegg i wonder what VERSION of visual C++ you're using"

Quote
Which software are you using?

Yes. VC++ 6.
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

Yegg

#14
Quote from: brew on July 19, 2007, 04:01 PM

"hyyyy im yegg i wonder what VERSION of visual C++ you're using"

Quote
Which software are you using?

Yes. VC++ 6.

What does that even mean? What version am I using? I don't use VC++. I mentioned that I haven't used it in ages. Earlier when I didn't specify it was because I didn't have to. I don't use any VC++ and both of them have that same feature. Therefore, my statement was completely correct. You couldn't figure out how to add the file so I asked which version you used, apparently you didn't know they had a version judging by your response... It's a few extremely simple steps that you considered "not so simple".