Files
SabreTools.Models/PortableExecutable/DialogBoxResource.cs
2023-09-10 21:24:10 -04:00

63 lines
2.3 KiB
C#

namespace SabreTools.Models.PortableExecutable
{
/// <summary>
/// A dialog box is also one resource entry in the resource file. It consists of one
/// DLGTEMPLATE dialog box header structure plus one DLGITEMTEMPLATE structure for each
/// control in the dialog box. The DLGTEMPLATEEX and the DLGITEMTEMPLATEEX structures
/// describe the format of extended dialog box resources.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/menurc/resource-file-formats"/>
public sealed class DialogBoxResource
{
#region Dialog template
/// <summary>
/// Dialog box header structure
/// </summary>
#if NET48
public DialogTemplate DialogTemplate { get; set; }
#else
public DialogTemplate? DialogTemplate { get; set; }
#endif
/// <summary>
/// Dialog box extended header structure
/// </summary>
#if NET48
public DialogTemplateExtended ExtendedDialogTemplate { get; set; }
#else
public DialogTemplateExtended? ExtendedDialogTemplate { get; set; }
#endif
#endregion
#region Dialog item templates
/// <summary>
/// Following the DLGTEMPLATE header in a standard dialog box template are one or more
/// DLGITEMTEMPLATE structures that define the dimensions and style of the controls in the dialog
/// box. The cdit member specifies the number of DLGITEMTEMPLATE structures in the template.
/// These DLGITEMTEMPLATE structures must be aligned on DWORD boundaries.
/// </summary>
#if NET48
public DialogItemTemplate[] DialogItemTemplates { get; set; }
#else
public DialogItemTemplate?[]? DialogItemTemplates { get; set; }
#endif
/// <summary>
/// Following the DLGTEMPLATEEX header in an extended dialog box template is one or more
/// DLGITEMTEMPLATEEX structures that describe the controls of the dialog box. The cDlgItems
/// member of the DLGITEMTEMPLATEEX structure specifies the number of DLGITEMTEMPLATEEX
/// structures that follow in the template.
/// </summary>
#if NET48
public DialogItemTemplateExtended[] ExtendedDialogItemTemplates { get; set; }
#else
public DialogItemTemplateExtended?[]? ExtendedDialogItemTemplates { get; set; }
#endif
#endregion
}
}