News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

who knows how to create a resource file

Started by andre, September 27, 2009, 03:17:34 PM

Previous topic - Next topic

andre


BlackVortex

Quote from: andre on September 27, 2009, 04:43:23 PM
i want to use a standard icon
You mean as the executable icon to be shown in windows explorer ?  I don't think it's possible, you'll have to rip one from another file to use it.

andre

i think there must be an icon by default which appear in the window

dedndave

it can be done, but there are drawbacks
for one thing, there is no guarantee that an icon under one OS will have the same ordinal under a different OS (although they will likely match)
also, the explorer.exe file has a number of good icons - same dealeo - no guarantees
Tedd gave us a link that gives you some standard menu icons - use one from there

http://msdn.microsoft.com/en-us/library/bb760433%28VS.85%29.aspx

if you use no icon at all, it will be the default exe icon
if you still want to know how to snag the shell32.dll icons, use the forum search window and look for "shell32.dll icon"
there have been a couple recent related threads
a while back, Erol (Vortex) even showed us how to set the console mode window icon - lol

andre

in examples which were included in masm package there are default icon is included in the programme example folder! i wonder why?

ThexDarksider

Quote from: andre on September 27, 2009, 05:04:51 PM
in examples which were included in masm package there are default icon is included in the programme example folder! i wonder why?

Uh because there's no point in deleting a 5 kb file when it was there in the first place?

Also a bit off topic: I use IcoFX to rip icons out of .exes and .dlls.

Quote from: dedndave on September 27, 2009, 04:58:01 PMTedd gave us a link that gives you some standard menu icons - use one from there

http://msdn.microsoft.com/en-us/library/bb760433%28VS.85%29.aspx

Aw lol too bad I didn't know that, in a program I made, I ripped and saved all those icons to .ico files and then imported them into my C# project. :\

sinsi

(why move it now hutch?)

Since you are creating a window and want a default icon, look to RegisterClassEx, specifically the WNDCLASSEX structure...
Quote
hIcon
Handle to the class icon. This member must be a handle to an icon resource. If this member is NULL, the system provides a default icon.
You don't need an icon for you program, windows will give you one.
Light travels faster than sound, that's why some people seem bright until you hear them.