Hello, I am rather new to Windows programming and I am writing a C application using the Win32 APIs.
My application should look more or less like the picture in this old (but not outdated) msdn example:


I mean: a frame window with a menu and a toolbar, the MDI client window and several child windows. Apparently the most common interface for an (old-style) application.
I am creating the MDI components as described in the official documentation:


The critical line seems to be:

hwndMDIClient = CreateWindow( "MDICLIENT", (LPCTSTR) NULL, 
            0, 0, 0, 0, hwnd, (HMENU) 0xCAC, hInst, (LPSTR) &ccs);
The MDI client takes the whole client area of the frame window, as it should be, even if I have assigned a size of (0,0). All is fine, up to this moment. Now I am trying to add a toolbar according to msdn. I have taken the code from:

It compiles without errors and I can see the toolbar. The problem is that, as soon as I create the first document (child window), the latter covers the toolbar. I need a way to tell the MDI client not to take the whole client area of the frame window, but only the bottom part of it, just like you would expect from any application. The toolbar should not be covered by the document windows.

Can you please tell me if there is a downloadable example of a simple MDI application that I can study? Possibly written in C (not in C++) ? Alternatively: is there a simple way to restrict the area available to the MDI client window?