#VERSION 0.3, 16/06/2015
- README file updated
- Sample applications added.
- DIALOG resource added.
- STRINGTABLE resource added.
- Many control types added for DIALOG resource
With this version we can add DIALOG resource type to our executables. Sample usage is given below.
1) First we need to add DIALOG to the RESOURCE tree
RESOURCE
TYPE RT_DIALOG
ID ID_DIALOG
LANG
LEAF RVA(dialog), SIZEOF(dialog)
ENDLANG
ENDID
ENDTYPE
ENDRESOURCE
2) Next we define our DIALOG resource
; dialogs name/label is same as the one mentioned on LEAF node.
; x,y coordinates
; cx, cy are width and heights
DIALOG dialog, x, y, cx, cy
; Dialogs can have optional FONT, CAPTION, MENU, STYLE and EXSTYLE macros
FONT size, 'font face'
STYLE bitflags
EXSTYLE bitflags
MENU resource_id
CAPTION 'text'
; Child controls
CONTROL 'text', id, class_id, x, y, cx, cy, optional style, optional exstyle
; Predefined child controls doesn't have class_id
PUSHBUTTON 'text', id, x, y, cx, cy, optional style, optional exstyle
...
ENDDIALOG
How to use STRINGTABLES?
1) Add stringtable to the resource tree as above.
2) Add stringtable as below
STRINGTABLE label
STRING 'First String'
STRING "Second String"
ENDSTRINGTABLE
3) Access strings from assembly code by using SID() macro. Short for string id.
LoadString, hInst, SID(String Table Resource ID, Index of string in the table)
SID(x,y) takes two parameter. First is ID of table defined in resource tree and other is string's index in table.
New sample applications are added to the project and old ones are updated.