using System.Runtime.InteropServices; namespace BinaryObjectScanner.Models.PortableExecutable { /// /// An extended dialog box template begins with a DLGTEMPLATEEX header that describes /// the dialog box and specifies the number of controls in the dialog box. For each /// control in a dialog box, an extended dialog box template has a block of data that /// uses the DLGITEMTEMPLATEEX format to describe the control. /// /// The DLGTEMPLATEEX structure is not defined in any standard header file. The /// structure definition is provided here to explain the format of an extended template /// for a dialog box. /// /// [StructLayout(LayoutKind.Sequential)] public sealed class DialogTemplateExtended { /// /// The version number of the extended dialog box template. This member must be /// set to 1. /// public ushort Version; /// /// Indicates whether a template is an extended dialog box template. If signature /// is 0xFFFF, this is an extended dialog box template. In this case, the dlgVer /// member specifies the template version number. If signature is any value other /// than 0xFFFF, this is a standard dialog box template that uses the DLGTEMPLATE /// and DLGITEMTEMPLATE structures. /// public ushort Signature; /// /// The help context identifier for the dialog box window. When the system sends a /// WM_HELP message, it passes this value in the wContextId member of the HELPINFO /// structure. /// public uint HelpID; /// /// The extended windows styles. This member is not used when creating dialog boxes, /// but applications that use dialog box templates can use it to create other types /// of windows. /// public ExtendedWindowStyles ExtendedStyle; /// /// The style of the dialog box. /// /// If style includes the DS_SETFONT or DS_SHELLFONT dialog box style, the DLGTEMPLATEEX /// header of the extended dialog box template contains four additional members (pointsize, /// weight, italic, and typeface) that describe the font to use for the text in the client /// area and controls of the dialog box. If possible, the system creates a font according /// to the values specified in these members. Then the system sends a WM_SETFONT message /// to the dialog box and to each control to provide a handle to the font. /// public WindowStyles Style; /// /// The number of controls in the dialog box. /// public ushort DialogItems; /// /// The x-coordinate, in dialog box units, of the upper-left corner of the dialog box. /// /// /// The x, y, cx, and cy members specify values in dialog box units. You can convert these values /// to screen units (pixels) by using the MapDialogRect function. /// public short PositionX; /// /// The y-coordinate, in dialog box units, of the upper-left corner of the dialog box. /// /// /// The x, y, cx, and cy members specify values in dialog box units. You can convert these values /// to screen units (pixels) by using the MapDialogRect function. /// public short PositionY; /// /// The width, in dialog box units, of the dialog box. /// /// /// The x, y, cx, and cy members specify values in dialog box units. You can convert these values /// to screen units (pixels) by using the MapDialogRect function. /// public short WidthX; /// /// The height, in dialog box units, of the dialog box. /// /// /// The x, y, cx, and cy members specify values in dialog box units. You can convert these values /// to screen units (pixels) by using the MapDialogRect function. /// public short HeightY; /// /// A variable-length array of 16-bit elements that identifies a menu resource for the dialog box. /// If the first element of this array is 0x0000, the dialog box has no menu and the array has no /// other elements. If the first element is 0xFFFF, the array has one additional element that /// specifies the ordinal value of a menu resource in an executable file. If the first element has /// any other value, the system treats the array as a null-terminated Unicode string that specifies /// the name of a menu resource in an executable file. /// /// /// If you specify character strings in the class and title arrays, you must use Unicode strings. Use the /// MultiByteToWideChar function to generate Unicode strings from ANSI strings. /// public string MenuResource; /// /// The ordinal value of a menu resource in an executable file. /// public ushort MenuResourceOrdinal; /// A variable-length array of 16-bit elements that identifies the window class of the /// dialog box. If the first element of the array is 0x0000, the system uses the predefined dialog /// box class for the dialog box and the array has no other elements. If the first element is 0xFFFF, /// the array has one additional element that specifies the ordinal value of a predefined system /// window class. If the first element has any other value, the system treats the array as a /// null-terminated Unicode string that specifies the name of a registered window class. /// /// /// If you specify character strings in the class and title arrays, you must use Unicode strings. Use the /// MultiByteToWideChar function to generate Unicode strings from ANSI strings. /// public string ClassResource; /// /// The ordinal value of a predefined system window class. /// public ushort ClassResourceOrdinal; /// /// The title of the dialog box. If the first element of this array is 0x0000, the dialog box has no /// title and the array has no other elements. /// /// /// If you specify character strings in the class and title arrays, you must use Unicode strings. Use the /// MultiByteToWideChar function to generate Unicode strings from ANSI strings. /// public string TitleResource; /// /// The point size of the font to use for the text in the dialog box and its controls. /// /// This member is present only if the style member specifies DS_SETFONT or DS_SHELLFONT. /// public ushort PointSize; /// /// The weight of the font. Note that, although this can be any of the values listed for the lfWeight /// member of the LOGFONT structure, any value that is used will be automatically changed to FW_NORMAL. /// /// This member is present only if the style member specifies DS_SETFONT or DS_SHELLFONT. /// public ushort Weight; /// /// Indicates whether the font is italic. If this value is TRUE, the font is italic. /// /// This member is present only if the style member specifies DS_SETFONT or DS_SHELLFONT. /// public byte Italic; /// /// The character set to be used. For more information, see the lfcharset member of LOGFONT. /// /// This member is present only if the style member specifies DS_SETFONT or DS_SHELLFONT. /// public byte CharSet; /// /// The name of the typeface for the font. /// /// This member is present only if the style member specifies DS_SETFONT or DS_SHELLFONT. /// /// /// If you specify character strings in the class and title arrays, you must use Unicode strings. Use the /// MultiByteToWideChar function to generate Unicode strings from ANSI strings. /// public string Typeface; } }