I have an app written in Qt and on Windows I handle native events myself, to have a custom window with native feeling.
I'm removing the caption like this, to achieve that the window is also positioned correctly when the taskbars auto-hide option is on.
DWORD style = GetWindowLong (hwnd, GWL_STYLE);
style &= ~WS_CAPTION;
style |= (WS_MAXIMIZEBOX | WS_THICKFRAME);
SetWindowLong (hwnd, GWL_STYLE, style);
..and I hide the border like suggested in the MSDN documentation:
switch (msg)
{
case WM_NCCALCSIZE:
{
// this removes the window frame and title bar we added with WS_THICKFRAME and
// WS_CAPTION
*result = 0;
return true;
}
...
I get a fully functional frameless window BUT when I hit the taskbar the border appears, which I don't want. So does anyone have an idea why this happens and how I could bypass it?
Btw if I don't remove the caption from the style I also have a frameless window and this problem doesn't appear but then I run into other problems.