Managing the nonclient area yourself is indeed a not too well documented and messy topic and there are a lot of pitfalls like you have to hide the borders when the window is maximized... If all you want is a custom drawn window (like that of a typical fancy media player) then I recommend you the following: Often its much easier to create a window without a single pixel of nonclient area, just create the window with WM_POPUP style without caption and border/frame (optionally with system menus to be able to bring up right click menus on the taskbar) and draw/handle everything yourself. A borderless captionless WM_POPUP window is just a rectangle and every single pixel of this rectangle is part of the client area.
In some scenarios where the location of the nonclient area matters this technique isn't a good solution but in many cases it is a quite viable option. Of course with a client-area-only window you have to handle every system functionality yourself (like drawing a title bar [somewhere] and moving the window when the title bar is grabbed, example to a grabbing window move operation by grabbing the client area:
Using SetCapture() and ReleaseCapture() correctly (usually during a drag n' drop operation).[
^]) and optional window resize or maximize features...