* rcparse.y (res_text_field): New res_id variable.

(res_null_text): New static const struct res_id object,
	with empty unicode name field.
	(control): Pop parsing of optresidc up one level. Set
	res_text_field to $2 except for controls which do not accept
	a text field.  Set res_text_field to res_null_text for the
	special cases (viz. COMBOBOX, EDITTEXT, LISTBOX, SCROLLBAR).
	(control_params): Adjust to use res_text_field rather
	than optresidc.
	(COMBOBOX): Add comment about discrepency between documented
	vs. observed default style.
	* resrc.c (define_control): Make first param const.
	* windres.h (define_control): Adjust prototype.

testsuite:

	* binutils-all/windres/checkbox.rc: New file.
	* binutils-all/windres/checkbox.rsd: New file.
	* binutils-all/windres/combobox.rc: New file.
	* binutils-all/windres/combobox.rsd: New file.
	* binutils-all/windres/edittext.rc: New file.
	* binutils-all/windres/edittext.rsd: New file.
	* binutils-all/windres/listbox.rc: New file.
	* binutils-all/windres/listbox.rsd: New file.
	* binutils-all/windres/scrollbar.rc: New file.
	* binutils-all/windres/scrollbar.rsd: New file.
This commit is contained in:
Danny Smith
2003-06-28 02:37:43 +00:00
parent 0b2828595e
commit b9ae04920a
15 changed files with 170 additions and 47 deletions

View File

@@ -819,7 +819,7 @@ define_dialog (id, resinfo, dialog)
struct dialog_control *
define_control (iid, id, x, y, width, height, class, style, exstyle)
struct res_id iid;
const struct res_id iid;
unsigned long id;
unsigned long x;
unsigned long y;