Rick,
I am still getting my feet wet in the Windows arena so I still have a lot to learn. I created a simple dialog and this is what ResEd (NOT ResEdit) created.
- Code: Select all Expand view RUN
#define IDD_DLG1 1000
#define IDC_STC1 1001
IDD_DLG1 DIALOGEX 4,3,146,81
CAPTION "IDD_DLG"
FONT 14,"Times New Roman",700,0
STYLE WS_CAPTION|WS_VISIBLE|WS_SYSMENU|WS_TABSTOP
EXSTYLE WS_EX_CLIENTEDGE
BEGIN
CONTROL "Test",IDC_STC1,"Static",WS_CHILD|WS_VISIBLE,24,19,66,17
END
When I selected WS_EX_CLIENTEDGE in xStyle for the main dialog window, it added the EXSTYLE to the file.
I did not look for other styles that would be listed in EXSTYLE. I believe DIALOGEX was designed to give programmers additional options for the dialog window itself.
Using DIALOGEX in place of DIALOG does not appear to cause problems, at least with BRC32. Using only DIALOGEX simplifies the ResEd code and allows a user to select, or not any of the extended style options. One exception might be if the RC file is then opened with BRW. If DIALOGEX evolved since BRW's last update, DIALOGEX in the file might be interpreted as an illegal code.
I ran BRC32 on the RC file above and got the following:
- Code: Select all Expand view RUN
Borland Resource Compiler Version 5.40
Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved.
Lines: Current 0, Total 0
New File: test.rc
Lines: Current 1, Total 0
New File: D:\Documents and Settings\Desktop\test.rc
Lines: Current 2, Total 1
Defining IDD_DLG1
Lines: Current 5, Total 4
Compiling DIALOGEX: IDD_DLG1
Lines: Current 0, Total 13
New File:
It does appear DIALOGEX compiles with BRCC32.
In order to fix Enrico Maria's problem, he sent me the RC file that had problems. It was created with BRW. I did a quick compare and the two files were not completely identical, but almost.
On the MSDN web site it says:
DIALOG Resource
The DIALOG resource-definition statement specifies a dialog box. The statement defines the position and dimensions of the dialog box on the screen as well as the dialog box style.
Note: DIALOG is an obsolete resource ID. New applications should use DIALOGEX.
And, when I link to DialogEx I get:
DIALOGEX Resource
The DIALOGEX resource-definition statement specifies a dialog box. The statement defines the position and dimensions of the dialog box on the screen as well as the dialog box style. It also defines the following:
-Help IDs on the dialog itself as well as on controls within the dialog box.
-Use of the EXSTYLE statement for the dialog box itself as well as on controls within the dialog box.
-Font weight and italic settings for the font to be used in the dialog box.
-Control-specific data for controls within the dialog box.
-Use of the BEDIT, IEDIT, and HEDIT predefined system class names
The link to this is at
http://msdn2.microsoft.com/en-us/library/aa381003.aspxOther users who are more qualified may be able to expand further on this.
Regards,
Ken