Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / Icons from .exe

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Icons from .exe
#4959
Posted by: 2004-08-06 22:44:09
Hello every one,

Does any one know how I can get an icon out of an application using wxWidgets?

I know how to use the wxIcon a little and how to get icons from a specific path but I need it from an application directly and it is destined to work on a Linux platform. UpCase already said that we cannot get icons from the executable file in Linux but there are "icons" for applications in Linux, no??? So they must get them from somewhere....

Thanks for helping me ;)

moons
Message2. Re: Icons from .exe
#4962
Posted by: upCASE 2004-08-06 23:10:13
Hi!
"UpCase already said that we cannot get icons from the executable file in Linux.." Nope, I didn't :)
I said that you can't get them from "resource", since they don't exist on Linux. I'd recommend to use XPMs on both Windows and Linux. XPMs can be "embedded" in the application, thus you don't need a separate file.
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message3. Re: Icons from .exe
#4964
Posted by: 2004-08-06 23:36:58
Ok, that's good but how do I get it out of the executable?? There is no function like ExtractIcon...and paths only go to the .exe. Moreover, applications already have icons designed and can it be in xpm format?? I tried learning about icon handling on Linux but there's not much information!!!!

Thx
Message4. Re: Icons from .exe
#4995
Posted by: 2004-08-17 06:26:40
hi,

first of all, this is an interesting topic. now a couple of resource/icon oriented questions:

- how to make the .rc file work with Dev-Cpp?? it seems that MY .rc is never compiled, because Dev-Cpp uses it's own private.rc (resource_private.h or something like that)..?

- how to create XPMs from other image formats (gif, jpeg, bmp) ???

thanx
Message5. Re: Icons from .exe
#5005
Posted by: firefox78 2004-08-19 22:48:09
You can get them by "ResHacker" or PeExplorer in Windows.
Message6. Re: Icons from .exe
#5026
Posted by: upCASE 2004-08-26 02:07:52
Hi!
- "how to make the .rc file work with Dev-Cpp"
Include the rc file in your project and compile. This should include your resource file in the "projectname_private.rc" and thus be compiled and linked.

- "how to create XPMs from other image formats (gif, jpeg, bmp)"
Check http://biolpc22.york.ac.uk/pub/support/ for an easy too called bnp2xpm. I guess you know what it will do :)
Almost every decent imaging software should have export support for XPM. The "best" thing would be to write a converter yourself :)
Hey, great idea for my upcoming tutorials :)
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Fri 2024-3-29  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0