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:

http://msdn.microsoft.com/en-us/libr...8%28v=vs.85%29

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:

http://msdn.microsoft.com/en-us/libr...9%28v=vs.85%29

The critical line seems to be:

Code:
hwndMDIClient = CreateWindow( "MDICLIENT", (LPCTSTR) NULL, 
            WS_CHILD | WS_CLIPCHILDREN | WS_VSCROLL | WS_HSCROLL, 
            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:
http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx

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?