We call the GLUT function
   glutCreateSubWindow
to create a subwindow within another window. The function returns an int that represents the handle to the window being created. Among other things, we use this handle to set the current window.

The function requires as its first parameter the window handle of the parent window, which is the main window for our example. The other four parameters to the function are, respectively, the x and y coordinates of the subwindows upper-left corner within the parent window and the width and height of the subwindow. Note from our discussion of the main program, we use percentages of the parent's dimensions in establishing the required values for the subwindow. Since GLUT expects the actual integer values, we compute here those values. For example, the x coordinate of the corner and the width of the subwindow are, respectively,
          startX*parentWidth/100    
    and   width*parentWidth/100