Message board for the users of flat assembler.
> Windows > How to understand resources ?
casey 18 Sep 2005, 02:43
My background: NASM using the NASMIDE IDE in DOS.
I am now up to Iczelion's Tutorial 8, Menu.
I am using Iczelion's tutorial along with Sulaiman
Chang's FASM versions of the examples.
What 'language' does a resource script use?
It appears different with MASM and FASM.
Is it the Assembler or the OS that reads this script?
I assume the LoadMenu API is how the menu resource
script is referenced to the program.
invoke LoadMenu, [wHInstance], 30 ; FASM
invoke LoadMenu, hInst, OFFSET MenuName ; MASM
Now in MASM, 'MenuName' is an address label to a
byte array, "FirstMenu",0
In the FASM version it is what?
I have found the 30 in the resource section:
resource appMenu, 30, LANG_ENGLISH, menuMain
menuitem 'MenuBar C (without item)', 30, MFR_END
which I take is an ID that is returned in the
wmCOMMAND's wParam when the item with that ID
Is there any easy way to understand all this?
|18 Sep 2005, 02:43||
shoorick 19 Sep 2005, 07:56
shortly and possible right in all detales
language of resource script is separate language to define resources for executable (pe, ne?...): it is understandable to resource compilers: rc.exe, gorc.exe etc., wich can make from it .res file or .obj file. each resource has id and optional name. to support resources fasm has own set of macros to use them without rc compiler, or can create resource section directly from res file.
resource can be load with same function by id and by name: if passed value is less then 32768, it is treated as id, otherwise - as pointer to asciiz string with resource name:
200 DIALOGEX ...
#define DMAIN 200
DMAIN DIALOGEX ...
dmain db "DMAIN",0
DMAIN DIALOGEX ...
|19 Sep 2005, 07:56||
< Last Thread | Next Thread >
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.