add resizeable bool

This commit is contained in:
FunkyFr3sh 2019-08-13 15:46:05 +02:00
parent f394d7f7ce
commit 43224a0f65
3 changed files with 24 additions and 1 deletions

View file

@ -1016,10 +1016,31 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_NCLBUTTONUP:
case WM_NCACTIVATE:
case WM_NCPAINT:
case WM_NCHITTEST:
{
return DefWindowProc(hWnd, uMsg, wParam, lParam);
}
case WM_NCHITTEST:
{
LRESULT result = DefWindowProc(hWnd, uMsg, wParam, lParam);
if (!ddraw->resizable)
{
switch (result)
{
case HTBOTTOM:
case HTBOTTOMLEFT:
case HTBOTTOMRIGHT:
case HTLEFT:
case HTRIGHT:
case HTTOP:
case HTTOPLEFT:
case HTTOPRIGHT:
return HTBORDER;
}
}
return result;
}
case WM_SETCURSOR:
{
// show resize cursor on window borders