This is an interesting idea, but it cannot be implemented at the level of application. This is not how the default Windows desktop is designed. Is you you maximize some application, it is, in general case, not your application. It will be maximized in a usual way, totally ignoring "special" behavior of your application. Can you see to consequences of it?
At the same time, what you want is possible, but you need to approach this problem for a different side. And I don't know if want to take the challenge. From the above paragraph, you should see that the layout you described is only possible if you develop some system-wide utility
which should offer some functionality, or some kind of alternative (or additional, there is no big difference) desktop.
I know it because I've done something similar (a desktop similar to a virtual desktop typical for Linux; I don't want to describe this project because it is very different from what you want to achieve). The description of just all design approaches you would need to consider would be too long for a short answer, so, just a couple of key thoughts:
You need to use raw Windows API to get access to all windows and a desktop window, to rearrange them appropriately. Alternatively, you can replace the whole desktop. To support docking, you will need to have some API in your utility, so some specially built applications could takes its benefits. This API can use any IPC of your choice, and can simply be implemented as a custom Windows message (such as "dock me on right"…). So far, I listed very trivial aspects. Non-trivial aspect is this: when you resize of maximize some "regulear" application developed without your API, it's position still need to be adjusted. To do it you need to use global Windows Hooks:
According to Microsoft documentation on Hooks, making a hook global requires that a hook (using the method referenced above) should be set in a separate native Windows DLL, not in application executable. Working with hooks, and especially debugging of their code, is the most difficult part of this work. It will really require serious qualification.
So, you need to think if you really want to mess with all of it. Think about one alternative: use Windows 7 and try to use Win+Left, Win+Right, Win+Top, Win+Bottom. No, this is not what you want
, but just some additional and pretty nice layout functionality (which should be also enabled is system settings). Maybe, you don't want your own desktop utility that much? :-)