OSDN Git Service

binutils/
[pf3gnuchains/pf3gnuchains4x.git] / winsup / doc / windres.sgml
1
2 <sect1 id="windres"><title>Defining Windows Resources</title>
3
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>
11
12 <screen>
13 <![CDATA[
14 myapp.exe : myapp.o myapp.res
15         gcc -mwindows myapp.o myapp.res -o $@
16
17 myapp.res : myapp.rc resource.h
18         windres $< -O coff -o $@
19 ]]>
20 </screen>
21
22
23 <para>What follows is a quick-reference to the syntax
24 <filename>windres</filename> supports.</para>
25
26 <screen>
27
28 id ACCELERATORS suboptions
29 BEG
30 "^C" 12
31 "Q" 12
32 65 12
33 65 12 , VIRTKEY ASCII NOINVERT SHIFT CONTROL ALT
34 65 12 , VIRTKEY, ASCII, NOINVERT, SHIFT, CONTROL, ALT
35 (12 is an acc_id)
36 END
37
38 SHIFT, CONTROL, ALT require VIRTKEY
39
40
41 id BITMAP memflags "filename"
42 memflags defaults to MOVEABLE
43
44
45 id CURSOR memflags "filename"
46 memflags defaults to MOVEABLE,DISCARDABLE
47
48
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
52
53 memflags defaults to MOVEABLE
54 exstyle may be EXSTYLE=number
55 styles: CAPTION "string"
56         CLASS id
57         STYLE  FOO | NOT FOO | (12)
58         EXSTYLE number
59         FONT number, "name"
60         FONT number, "name",weight,italic
61         MENU id
62         CHARACTERISTICS number
63         LANGUAGE number,number
64         VERSIONK number
65 controls:
66         AUTO3STATE params
67         AUTOCHECKBOX params
68         AUTORADIOBUTTON params
69         BEDIT params
70         CHECKBOX params
71         COMBOBOX 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]
74         CTEXT params
75         DEFPUSHBUTTON params
76         EDITTEXT params
77         GROUPBOX params
78         HEDIT params
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]
82         IEDIT params
83         LISTBOX params
84         LTEXT params
85         PUSHBOX params
86         PUSHBUTTON params
87         RADIOBUTTON params
88         RTEXT params
89         SCROLLBAR params
90         STATE3 params
91         USERBUTTON "string", id, x,y,w,h, style, exstyle
92 params:
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]
96
97 [data] is optional BEG (string|number) [,(string|number)] (etc) END
98
99
100 id FONT memflags "filename"
101 memflags defaults to MOVEABLE|DISCARDABLE
102
103 id ICON memflags "filename"
104 memflags defaults to MOVEABLE|DISCARDABLE
105
106 LANGUAGE num,num
107
108 id MENU options BEG items END
109 items:
110         "string", id, flags
111         SEPARATOR
112         POPUP "string" flags BEG menuitems END
113 flags:
114         CHECKED
115         GRAYED
116         HELP
117         INACTIVE
118         MENUBARBREAK
119         MENUBREAK
120
121 id MENUEX suboptions BEG items END
122 items:
123         MENUITEM "string"
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
130
131 id MESSAGETABLE memflags "filename"
132 memflags defaults to MOVEABLE
133
134 id RCDATA suboptions BEG (string|number) [,(string|number)] (etc) END
135
136 STRINGTABLE suboptions BEG strings END
137 strings:
138         id "string"
139         id, "string"
140
141 (User data)
142 id id suboptions BEG (string|number) [,(string|number)] (etc) END
143
144 id VERSIONINFO stuffs BEG verblocks END
145 stuffs: FILEVERSION num,num,num,num
146         PRODUCTVERSION num,num,num,num
147         FILEFLAGSMASK num
148         FILEOS num
149         FILETYPE num
150         FILESUBTYPE num
151 verblocks:
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
156
157
158
159 suboptions:
160         memflags
161         CHARACTERISTICS num
162         LANGUAGE num,num
163         VERSIONK num
164
165 memflags are MOVEABLE/FIXED PURE/IMPURE PRELOAD/LOADONCALL DISCARDABLE
166
167 </screen>
168
169 </sect1>