• Welcome to Valhalla Legends Archive.
 

Icon Changing

Started by Dayclone, June 11, 2003, 08:26 PM

Previous topic - Next topic

Camel

Quote from: Grok on June 25, 2003, 06:32 AM
See I totally took the question wrong, and assumed the person was wanting to do something fun and clever to his own code.  Here's what I thought he wanted to do, which would be much more fun of a programming exercise:

"I have two programs - my bot and my loader.  Sometimes I want to have the loader replace icon, bitmap, and other resources in my bot's executable and saved that way.  Then I don't have to recompile my bot but can distribute slightly different looking look-and-feels to various people.  Which part of the Windows SDK/API will help me do this?  Any URL to sample code would be golden.  Thanks."

Now that would be a legit question :)

Actually, I wouldn't use any api calls if I wanted to do this. I would either #If code out for "frmWhatever.Picture = LoadPicture(...)" or distribute the graphics as external files and dynamicly load them like a skin (also using LoadPicture()).

Grok

Sure but those methods would each require recompiling the program that is already a binary form executable.  Sticking to the question as I posed it, how would you modify a binary with new resources, possibly even different sizes, without access to the source code?

Camel

You implied that said programmer has the source and just doesnt want to modify it. I was merely trying to point out that that's a retarded way of programming.

Eternal

*pulls up a chair to watch the show...
^-----silly Brit
-----------------------------
www.brimd.com

smoke

Better yet, if you just want to have dynamic icons for easy distribution.  Take one from blizzard, just post your icons file to a webpage and use the windows IPicture api's to retrieve and load it.  Isn't it painfully obvious though that this guy told the truth.  Out of all honesty, he said he's doing it because he's lazy.

True, you've got to be lazy to go to the trouble of hexing/modding somebody elses bot rather than write your own.

-smoke

*grabs some popcorn and passes it to Eternal

Camel

Wasn't the point to be able to distribute different "flavours" to different people? If so, wouldn't downloading pictures at runtime just make the hole he's in bigger?