This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] windres (ungarbled): (2) CAPTION sets WS_CAPTION style


If a CAPTION is defined, rc.exe adds the WS_CAPTION style 
(WS_BORDER | WS_DLGFRAME). 

The patch adds WS_CAPTION to both style and dialog->style, 
and works with or without the default style patch. 

ChangeLog:

2002-03-19 Gunnar Degnbol <degnbol@danbbs.dk>

	* rcparse.y: Add WS_CAPTION dialog style if CAPTION 
	is specified

capstyle.rc:

101 DIALOG DISCARDABLE  0, 0, 186, 95
CAPTION ""
BEGIN
    DEFPUSHBUTTON "OK",1,129,7,50,14
END

Before patch:

$ /bin/windres.exe -i capstyle.rc 
LANGUAGE 0, 0

101 DIALOG MOVEABLE DISCARDABLE 0, 0, 186, 95
STYLE 0x80880000
CAPTION ""
BEGIN
  DEFPUSHBUTTON "OK", 1, 129, 7, 50, 14, 0x50010001
END

After patch:

$ windres.exe -i capstyle.rc 
LANGUAGE 9, 1

101 DIALOG MOVEABLE DISCARDABLE 0, 0, 186, 95
STYLE 0x80c80000
CAPTION ""
BEGIN
  DEFPUSHBUTTON "OK", 1, 129, 7, 50, 14, 0x50010001
END

capstyle.patch:
--- binutils/rcparse.y	Sun Mar 17 14:41:50 2002
+++ binutils.new/rcparse.y	Sun Mar 17 14:43:46 2002
@@ -412,6 +412,8 @@
 	  /* empty */
 	| styles CAPTION QUOTEDSTRING
 	  {
+	    dialog.style |= WS_CAPTION;
+	    style |= WS_CAPTION;
 	    unicode_from_ascii ((int *) NULL, &dialog.caption, $3);
 	  }
 	| styles CLASS id


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]