flat assembler
Message board for the users of flat assembler.

Index > Windows > Icon question

Author
Thread Post new topic Reply to topic
ltheonel



Joined: 08 Jul 2011
Posts: 8
ltheonel 26 Jul 2011, 15:53
Hello when i change my icon like this:
section '.rsrc' resource data readable

directory RT_ICON,icons,\
RT_GROUP_ICON,group_icons

resource icons,\
1,LANG_NEUTRAL,icon_data

resource group_icons,\
1,LANG_NEUTRAL,main_icon

icon main_icon,icon_data,'Burn.ico'

The icon changes with the burn image in the icon file but, but when i move the exe to desktop the image change to an other image. Maybe someone can help.
Post 26 Jul 2011, 15:53
View user's profile Send private message Reply with quote
Overflowz



Joined: 03 Sep 2010
Posts: 1046
Overflowz 26 Jul 2011, 16:15
Maybe you need different size icons for some places ? Try to use some resource editor and watch exe files, they have a lot of icons with custom size.
To be sure, change "View > What you have in that folder"
for example, View > Large Icons.. etc..
Post 26 Jul 2011, 16:15
View user's profile Send private message Reply with quote
ltheonel



Joined: 08 Jul 2011
Posts: 8
ltheonel 26 Jul 2011, 17:44
Yeah it changed... changed the icon group entry with reshacker from 0x0
to 32x32 works now...
Post 26 Jul 2011, 17:44
View user's profile Send private message Reply with quote
Enko



Joined: 03 Apr 2007
Posts: 676
Location: Mar del Plata
Enko 26 Jul 2011, 20:02
If you put diferent sized icons into the icon group, windows will use automatically the size that suit best. like 16x16 (list view icon), 24x24 (tray?), 32x32(normal icon), 48x48 (tile view icon)
Post 26 Jul 2011, 20:02
View user's profile Send private message Reply with quote
Overflowz



Joined: 03 Sep 2010
Posts: 1046
Overflowz 26 Jul 2011, 21:28
Enko
It does not for me. Using 32x32 icon. I don't understand why. I grabbed it from an application and copied in mine. I see icon are added in resources but no icon is shown on desktop, but real application's is shown. (real app has 1 icon only - 32x32.)
Post 26 Jul 2011, 21:28
View user's profile Send private message Reply with quote
Enko



Joined: 03 Apr 2007
Posts: 676
Location: Mar del Plata
Enko 26 Jul 2011, 23:33
I use this template, it has 3 icons of different size, and it does work. If I switch to Tile View it will load the large icon, if I put in the Explorer Icon view, it shows the 32x32 icon.

Code:
format PE Console
entry start 

include '%fasminc%\win32a.inc'
include '%fasminc%\macro\if.inc'



section '.data' data readable writeable 
  szPause  db 'PAUSE',0
     
    
    
section '.code' code readable executable 
start: 
      

        ;TODO
       
    
    
    cinvoke system, szPause
     invoke  ExitProcess,0





section '.idata' import data readable writeable 

library kernel32,'kernel32.dll',\ 
        user32,'user32.dll',\ 
   msvcrt,'msvcrt.dll'

include '%fasminc%\api\kernel32.inc'
include '%fasminc%\api\user32.inc'
include '%fasminc%\api\msvcrt.inc'



section '.rsrc' resource data readable

directory    RT_VERSION,versions,\
    RT_ICON,icons,\
    RT_GROUP_ICON,gruop_icons,\
    24,xpmanifests

    


resource icons,\
    200,LANG_NEUTRAL,icon_1,\
    201,LANG_NEUTRAL,icon_2,\
    202,LANG_NEUTRAL,icon_3


resource gruop_icons,\
300,LANG_NEUTRAL,main_icon

    
resource versions,\
    1,LANG_NEUTRAL,version
     
resource xpmanifests,\
    1,LANG_NEUTRAL,manifest


versioninfo version,VOS__WINDOWS32,VFT_APP,VFT2_UNKNOWN,LANG_ENGLISH+SUBLANG_DEFAULT,0,\
       'FileDescription','DIALOG',\
   'LegalCopyright','No rights reserved.',\
       'FileVersion','1.0',\
  'ProductVersion','1.0',\
       'OriginalFilename','NONAME.EXE'
 
icon main_icon,\
    icon_1,'%fasminc%\RESOURCE\icon_1.ico',\
    icon_2,'%fasminc%\RESOURCE\icon_2.ico',\
    icon_3,'%fasminc%\RESOURCE\icon_3.ico'

resdata  manifest
file '%fasminc%\RESOURCE\xpmanifest.xml'
endres   
    


you will need 3 icons for the example to work on the %fasmin%\RESOURCE directory.
Post 26 Jul 2011, 23:33
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.