Parent/Child/Owner Relationship

The format of the DLGTEMPLATE and WINDOWTEMPLATE resources is very general to allow tree-structured relationships within the resource format. The general layout of the templates is:

WINDOWTEMPLATE id
BEGIN
    WINDOW winTop             the top-level window
    BEGIN
        WINDOW wind1
        WINDOW wind2
        WINDOW wind3
        BEGIN
            WINDOW wind4
        END
        WINDOW wind5
    END
END

In this example, the top-level window is identified by winTop. It has four child windows: wind1, wind2, wind3, and wind5. wind3 has one child window, wind4. When each of these windows is created, the parent and the owner are set to be the same.

The only time when the parent and owner windows are not the same is when frame controls are automatically created by a frame window.

Note that the WINDOW statements in the example above could also have been CONTROL or DIALOG statements.


[Back: Presentation Parameters Statement]
[Next: Predefined Window Classes]