flat assembler
Message board for the users of flat assembler.
Index
> Windows > Resource in EXE-file |
Author |
|
Garthower 11 Mar 2007, 03:29
If you have compiled RES-file you can include one to your EXE-file like this:
Code: section '.rsrc' resource from 'you_res_file_name' readable |
|||
11 Mar 2007, 03:29 |
|
Tomasz Grysztar 11 Mar 2007, 14:14
genius wrote: How I can include resource in my program? For example I know how include version and dialog resource. As I can add bitmap, strings, xml-theme and raw data resource to my program? In fasm.pdf I have not found this theme. In section 3.1.6 of FASM.PDF you can find the samples of including bitmap and a raw resource on the example of XML manifest. You read the same section online, too. |
|||
11 Mar 2007, 14:14 |
|
genius 12 Mar 2007, 15:49
Thanks, but I now tihs metohd. Me interests how to include string resource, and bitmap resource in my EXE file, What for this purpose exist macros on FASM. That is how it is possible to include any resources in an EXE-file using only opportunities FASM? Still there is a problem when I include icon in an EXE-file thats link only first image on my icon (icon has 16x16, 32x32 and 48x48 formats it's one file).
Code: section '.rsrc' resource data readable directory RT_GROUP_ICON,group_icons,\ RT_ICON,icons,\ resource group_icons,\ IDI_MAIN,LANG_NEUTRAL,main_icon resource icons,\ 1,LANG_NEUTRAL,main_icon_data icon main_icon,main_icon_data,'resource\mainicon.ico' Compiller say "No errors", but it's code link only first image on icons. Explain it restrictions of macros or I incorrectly do something. Thanks. |
|||
12 Mar 2007, 15:49 |
|
Tomasz Grysztar 12 Mar 2007, 21:50
Yes, the "icon" macro includes only the first image from .ICO file, if you want multiple images in one icon resource, you have to use separate .ICO files for each one.
|
|||
12 Mar 2007, 21:50 |
|
hidden 20 Mar 2007, 06:10
Quote: Still there is a problem when I include icon in an EXE-file thats link only first image on my icon (icon has 16x16, 32x32 and 48x48 formats it's one file). Example: Code: format PE include 'win32w.inc' section '.res' resource macro multi_icon group,[label,icon_file,num] { common local count count = 0 forward local data,size,position label dd RVA data,size,0,0 virtual at 0 file icon_file:6+(num*16),16 load size dword from 8 load position dword from 12 end virtual data file icon_file:position,size count = count+1 common local header align 4 group dd RVA header,6+count*14,0,0 header dw 0,1,count forward file icon_file:6+(num*16),12 dw label#.resid common align 4 } directory RT_ICON, icons,\ RT_GROUP_ICON, group_icons resource icons,\ 1, LANG_NEUTRAL, icon_data1,\ 2, LANG_NEUTRAL, icon_data2,\ 3, LANG_NEUTRAL, icon_data3 resource group_icons,\ 10, LANG_NEUTRAL, main_icon multi_icon main_icon,\ icon_data1, 'ico103.ico', 0,\ icon_data2, 'ico103.ico', 1,\ icon_data3, 'ico103.ico', 2 |
|||
20 Mar 2007, 06:10 |
|
genius 20 Mar 2007, 15:58
Hidden, thank for this macros. I shall necessarily look. Me still interests how to include in EXE-file string resource.
Thanks. |
|||
20 Mar 2007, 15:58 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.