I have a program which using MDI, i need the mdi client area to be resizable (not to the width and height of the parent window) so to do this i sized it in the parent window procedure and returned 0 (not letting it return DefFrameProc), this works fine except that when i maximize a mdi child window, it cannot be restored, minimized or closed, it does nothing on click of those 3 buttons, this works fine when i return DefFrameProc from WM_SIZE so what i'm asking, is there a way to stop the mdi client from resizing to the size of the parent or is there a way to make these 3 buttons work with my method, thanks.
EDIT: I think I missed a bit of your post, so I don't know if this is exactly what you're looking for. Sorry.
Well, put simply, when you click on any of those buttons, as with any other action you do, messages are sent to the window affected. By removing the DefWindowProc, the window isn't being told to do anything when it gets those messages. It gets them, but since it doesn't fit any of your case statements, it is processed by the default case, which tells it to do nothing. To fix this, you could do one of two things.
You could add in cases for the messages that re sent for those buttons and process them the same as DefWindowProc, then keep the default at returning 0. This might be difficult, though, since it's not like you can go into the header and look at the code for the function. In headers, functions are generally prototyped only in the *.h, since that doesn't use extra memory in the compiled program. The actual definiton of a function can be found in the *.lib or *.a for that header, since libraries are only accessed if needed and therefore, it only adds extra code to your compiled program if you use that code. The downside is that libraries are precompiled, meaning that you can't go look at the code.
Your other option is to add cases for the resizing messages, and simply set them to return 0. That way, the message never gets to the DefWindowProc, so it isn't resized, and you still get processing for every other message. This would be the solution I would use, since it prevents other problems arising from unprocessed messages, and it's just plain easier. You can do a google search or ask aruond here to find out what messages deal with resizing.
default breaks to return DefFrameProc,
those 3 buttons process the WM_SIZE message also
*smacks head* How could I have forgotten about WM_SIZE? Bah.
In that case, you should just add a case for WM_SIZE and set it to do nothing. Then keep default returning DeFrameProc(). Other than that, I can't think of any other solutions.