That is defined by the window style (dwWinStyle) in the initial WGCreatePage call. See the manual concerning that function. You have been creating a default Popup window which happens when you pass in NULL or 0 as the window style. If you want the graph inside another window, create it using a WS_CHILD + WS_CLIPSIBLINGS + WS_VISIBLE window style, exactly as if you were create an arbitrary child window using Windows API calls. Make sure you specify the parent window handle (hwParent), and it sounds like you should use the PAGE_CLIENT nPosStyle parameter, where it will fill the client area of the parent window. The MDIDemo example program has an example of this.