To create a sample toplevel window the following code can be done. This is shown in documentation and Motif books (specifically this example is based on "Motif Essentia