Sets the restype for the dialog.

Syntax:

SetRestype( Restype As String )
Parameters: Restype Restype to be set. Valid restypes: dialogitem, dialog, menuitem, popupmenu.

Example:
Dim Dlg As Win32StyleDialog
Dim TU As TransUnit
Dim TempTU As TransUnit
Dim StyleTU As TransUnit
Dim ExStyleTU As TransUnit
Dim Grp As Group
Dim ParentNode As Long

Set TU = Application.ActiveTransUnit
Set Dlg = Application.Tools.RestypeEditors.Win32StyleDialog

If ((TU.Restype = "x-exstyle") Or (TU.Restype = "x-style")) Then
    ParentNode = TU.ParentNode
    If (TU.ProjectFile.IsGroup(ParentNode)) Then
        Set Grp = TU.ProjectFile.GetGroup(ParentNode)
        
        For Each TempTU In Grp.TransUnits
            If (TempTU.Restype = "x-style") Then
                Call Dlg.SetStyleSource(TempTU.Source)
                Dlg.StyleTarget = TempTU.target
                Set StyleTU = TempTU
            End If
            If (TempTU.Restype = "x-exstyle") Then
                Call Dlg.SetExtendedStyleSource(TempTU.Source)
                Dlg.ExtendedStyleTarget = TempTU.target
                Set ExStyleTU = TempTU
            End If
        Next TempTU
        
        Call Dlg.SetRestype(Grp.Restype)
        If (Dlg.Show) Then
            If Not (StyleTU Is Nothing) Then
                StyleTU.target = Dlg.StyleTarget
            End If
            If Not (ExStyleTU Is Nothing) Then
                ExStyleTU.target = Dlg.ExtendedStyleTarget
            End If
        End If
    End If
End If

See also:

Class Win32StyleDialog


Last Updated: 12/08/04