2 <sect1 id="windres"><title>Defining Windows Resources</title>
4 <para><filename>windres</filename> reads a Windows resource file
5 (<filename>*.rc</filename>) and converts it to a res or coff file.
6 The syntax and semantics of the input file are the same as for any
7 other resource compiler, so please refer to any publication describing
8 the Windows resource format for details. Also, the
9 <filename>windres</filename> program itself is fully documented in the
10 Binutils manual. Here's an example of using it in a project:</para>
14 myapp.exe : myapp.o myapp.res
15 gcc -mwindows myapp.o myapp.res -o $@
17 myapp.res : myapp.rc resource.h
18 windres $< -O coff -o $@
23 <para>What follows is a quick-reference to the syntax
24 <filename>windres</filename> supports.</para>
28 id ACCELERATORS suboptions
33 65 12 , VIRTKEY ASCII NOINVERT SHIFT CONTROL ALT
34 65 12 , VIRTKEY, ASCII, NOINVERT, SHIFT, CONTROL, ALT
38 SHIFT, CONTROL, ALT require VIRTKEY
41 id BITMAP memflags "filename"
42 memflags defaults to MOVEABLE
45 id CURSOR memflags "filename"
46 memflags defaults to MOVEABLE,DISCARDABLE
49 id DIALOG memflags exstyle x,y,width,height styles BEG controls END
50 id DIALOGEX memflags exstyle x,y,width,height styles BEG controls END
51 id DIALOGEX memflags exstyle x,y,width,height,helpid styles BEG controls END
53 memflags defaults to MOVEABLE
54 exstyle may be EXSTYLE=number
55 styles: CAPTION "string"
57 STYLE FOO | NOT FOO | (12)
60 FONT number, "name",weight,italic
62 CHARACTERISTICS number
63 LANGUAGE number,number
68 AUTORADIOBUTTON params
72 CONTROL ["name",] id, class, style, x,y,w,h [,exstyle] [data]
73 CONTROL ["name",] id, class, style, x,y,w,h, exstyle, helpid [data]
79 ICON ["name",] id, x,y [data]
80 ICON ["name",] id, x,y,w,h, style, exstyle [data]
81 ICON ["name",] id, x,y,w,h, style, exstyle, helpid [data]
91 USERBUTTON "string", id, x,y,w,h, style, exstyle
93 ["name",] id, x, y, w, h, [data]
94 ["name",] id, x, y, w, h, style [,exstyle] [data]
95 ["name",] id, x, y, w, h, style, exstyle, helpid [data]
97 [data] is optional BEG (string|number) [,(string|number)] (etc) END
100 id FONT memflags "filename"
101 memflags defaults to MOVEABLE|DISCARDABLE
103 id ICON memflags "filename"
104 memflags defaults to MOVEABLE|DISCARDABLE
108 id MENU options BEG items END
112 POPUP "string" flags BEG menuitems END
121 id MENUEX suboptions BEG items END
124 MENUITEM "string", id
125 MENUITEM "string", id, type [,state]
126 POPUP "string" BEG items END
127 POPUP "string", id BEG items END
128 POPUP "string", id, type BEG items END
129 POPUP "string", id, type, state [,helpid] BEG items END
131 id MESSAGETABLE memflags "filename"
132 memflags defaults to MOVEABLE
134 id RCDATA suboptions BEG (string|number) [,(string|number)] (etc) END
136 STRINGTABLE suboptions BEG strings END
142 id id suboptions BEG (string|number) [,(string|number)] (etc) END
144 id VERSIONINFO stuffs BEG verblocks END
145 stuffs: FILEVERSION num,num,num,num
146 PRODUCTVERSION num,num,num,num
152 BLOCK "StringFileInfo" BEG BLOCK BEG vervals END END
153 BLOCK "VarFileInfo" BEG BLOCK BEG vertrans END END
154 vervals: VALUE "foo","bar"
155 vertrans: VALUE num,num
165 memflags are MOVEABLE/FIXED PURE/IMPURE PRELOAD/LOADONCALL DISCARDABLE