Hi all!!
i'm just a beginner in asm and have a tipical question, that is how about those icon's. You know with the tutorials from Icz. I can only get the Icons:
IDI_APPLICATION,
IDI_ASTERISK,
IDI_EXCLAMATION,
IDI_HAND,
IDI_QUESTION,
IDI_WINLOGO
in my application. How about user made icons and how about the little icon before of my *.exe file because i don't know how to change that one except to get default IDI_APPLICATION icon.
Well i think it's not hard but you have to know how to do it, please let me know if you think THIS IS SOOOO EASY i will be glad:)
THx a lot..
i'm just a beginner in asm and have a tipical question, that is how about those icon's. You know with the tutorials from Icz. I can only get the Icons:
IDI_APPLICATION,
IDI_ASTERISK,
IDI_EXCLAMATION,
IDI_HAND,
IDI_QUESTION,
IDI_WINLOGO
in my application. How about user made icons and how about the little icon before of my *.exe file because i don't know how to change that one except to get default IDI_APPLICATION icon.
Well i think it's not hard but you have to know how to do it, please let me know if you think THIS IS SOOOO EASY i will be glad:)
THx a lot..
eisodur,
Use the following code to load the icon you want then use the icon handle in the WNDCLASSEX structure for the icon members. Works fine.
Hmmm, I just reread you post and I answered the wrong question. :)
Have a look at a template created with Prostart.exe from MASM32 to see how a normal icon that you create yourself is loaded. You will need a resource editor of some type to create icons.
Regards,
hutch@movsd.com
Use the following code to load the icon you want then use the icon handle in the WNDCLASSEX structure for the icon members. Works fine.
invoke LoadIcon,NULL,IDI_ASTERISK
mov hIcon, eax
Hmmm, I just reread you post and I answered the wrong question. :)
Have a look at a template created with Prostart.exe from MASM32 to see how a normal icon that you create yourself is loaded. You will need a resource editor of some type to create icons.
Regards,
hutch@movsd.com
I tried and i tried but it worked for me after one hour of trying, thx!!
further i had to put the hInstance as an argument and not NULL,thus it looks like this:
...
invoke loadICon, hInstance, IDI_ICON
...
and define IDI_ICON as equ 1 in the resource and .const var.
further i had to put the hInstance as an argument and not NULL,thus it looks like this:
...
invoke loadICon, hInstance, IDI_ICON
...
and define IDI_ICON as equ 1 in the resource and .const var.
Remember that LoadIcon has been superseded by LoadImage...
Microsoft recommends to not use LoadIcon anymore...
Microsoft recommends to not use LoadIcon anymore...
@Readiosys
thanks for info. i didnt read this before.
thanks for info. i didnt read this before.
in my application. How about user made icons and how about the little icon before of my *.exe file because i don't know how to change that one except to get default IDI_APPLICATION icon.
do you mean the icon you see in say Explorer? i think the default icon is the numerically lowest icon in your resource file when you link your program.