Fenêtre sans barre de titre mais redimentionable
Bonjour,
Je remonte ce vieux post pour poser une question.
Je voudrais pouvoir construire une fenêtre sans barre de titre mais redimentionable.
J'ai utilisé ce code que j'ai trouvé dans l'exemple "Jv XP Controls simple demo" de la JVCL
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| DWORD RemoveTitleBar(HANDLE hWindow, bool Hide = true)
{
RECT R;
DWORD Result;
Result = GetWindowLong(hWindow, GWL_STYLE);
if (Hide)
Result = Result & !WS_CAPTION;
else
Result = Result | WS_CAPTION;
GetClientRect(hWindow, &R);
SetWindowLong(hWindow, GWL_STYLE, Result);
AdjustWindowRect(&R, Result, GetMenu(hWindow)!=0);
SetWindowPos(hWindow, 0, 0, 0, (R.right - R.left), (R.bottom - R.top),
SWP_DRAWFRAME | SWP_NOMOVE | SWP_NOZORDER | SWP_FRAMECHANGED | SWP_NOSENDCHANGING);
return Result;
} |
La barre de titre s'en va mais j'aimerais garder le tour mais redimentionable parce qu'avec votre solution, on obtient une fenêtre avec une bordure mais on ne peut rien en faire.
Merci.