Allow specifying extended control styles also in standard dialogs

(reported by Michael Lin).
This commit is contained in:
Alexandre Julliard 2005-03-08 19:09:16 +00:00
parent 043b5d9bab
commit 72d6373743
1 changed files with 16 additions and 10 deletions

View File

@ -352,7 +352,6 @@ static int rsrcid_to_token(int lookahead);
%type <dginit> dlginit %type <dginit> dlginit
%type <styles> optional_style_pair %type <styles> optional_style_pair
%type <num> any_num %type <num> any_num
%type <style> optional_style
%type <style> style %type <style> style
%type <str> filename %type <str> filename
@ -889,7 +888,7 @@ ctrls : /* Empty */ { $$ = NULL; }
; ;
lab_ctrl lab_ctrl
: tSTRING opt_comma expr ',' expr ',' expr ',' expr ',' expr optional_style { : tSTRING opt_comma expr ',' expr ',' expr ',' expr ',' expr optional_style_pair {
$$=new_control(); $$=new_control();
$$->title = new_name_id(); $$->title = new_name_id();
$$->title->type = name_str; $$->title->type = name_str;
@ -901,14 +900,20 @@ lab_ctrl
$$->height = $11; $$->height = $11;
if($12) if($12)
{ {
$$->style = $12; $$->style = $12->style;
$$->gotstyle = TRUE; $$->gotstyle = TRUE;
if ($12->exstyle)
{
$$->exstyle = $12->exstyle;
$$->gotexstyle = TRUE;
}
free($12);
} }
} }
; ;
ctrl_desc ctrl_desc
: expr ',' expr ',' expr ',' expr ',' expr optional_style { : expr ',' expr ',' expr ',' expr ',' expr optional_style_pair {
$$ = new_control(); $$ = new_control();
$$->id = $1; $$->id = $1;
$$->x = $3; $$->x = $3;
@ -917,8 +922,14 @@ ctrl_desc
$$->height = $9; $$->height = $9;
if($10) if($10)
{ {
$$->style = $10; $$->style = $10->style;
$$->gotstyle = TRUE; $$->gotstyle = TRUE;
if ($10->exstyle)
{
$$->exstyle = $10->exstyle;
$$->gotexstyle = TRUE;
}
free($10);
} }
} }
; ;
@ -982,11 +993,6 @@ opt_font
; ;
/* ------------------------------ style flags ------------------------------ */ /* ------------------------------ style flags ------------------------------ */
optional_style /* Abbused once to get optional ExStyle */
: /* Empty */ { $$ = NULL; }
| ',' style { $$ = $2; }
;
optional_style_pair optional_style_pair
: /* Empty */ { $$ = NULL; } : /* Empty */ { $$ = NULL; }
| ',' style { $$ = new_style_pair($2, 0); } | ',' style { $$ = new_style_pair($2, 0); }