Removing standard buttons is much easier than adding them (see example ). But with the addition of its new elements is not easy.
Immediately note that the application is done only under Windows (judging by the text of the question). I don’t know anything special in Qt to support these buttons, so I’ll have to dive into the WIN API. Before the Aero epoch, the problem was solved easily - we could draw anything on our own: just catch WM_NCPAINT
( redrawing outside the client area ), respond to window header events ( WM_NCHITTEST
, WM_NCLBUTTONDOWN
, etc.).
This is about processing WM_PAINT
, just draw not inside the window, but in the whole window.
But since the beginning of the era of visual schemes, everything has become much more complicated. As far as I understand, the only normal way is to repeat the styles of drawing buttons with our pens. That is, in your code you need to see which version of Windows the user has and whether Aero is enabled to choose which frame width to use, etc. The approach is bad (I will be glad if someone specifies a more human solution), so it is better to think soberly whether it is necessary to add new buttons.
But since no one wants to do this, they usually just ignore the Windows styles (for example, Google Chrome uses its own window style completely, so it boldly shoves what buttons it wants in any part of the window title).