Fixed the new Windows uiArea functions.

This commit is contained in:
Pietro Gagliardi 2016-10-25 23:41:37 -04:00
parent 9d754bbf2a
commit 8819d9cd58
1 changed files with 18 additions and 18 deletions

View File

@ -103,8 +103,8 @@ void uiAreaBeginUserWindowMove(uiArea *a)
HWND toplevel;
// TODO restrict execution
// TODO release capture
toplevel = xxxx(a->hwnd);
ReleaseCapture(); // TODO use properly and reset internal data structures
toplevel = parentToplevel(a->hwnd);
if (toplevel == NULL) {
// TODO
return;
@ -120,7 +120,7 @@ void uiAreaBeginUserWindowResize(uiArea *a, uiWindowResizeEdge edge)
WPARAM wParam;
// TODO restrict execution
// TODO release capture
ReleaseCapture(); // TODO use properly and reset internal data structures
toplevel = parentToplevel(a->hwnd);
if (toplevel == NULL) {
// TODO
@ -129,30 +129,30 @@ void uiAreaBeginUserWindowResize(uiArea *a, uiWindowResizeEdge edge)
// see http://stackoverflow.com/questions/40249940/how-do-i-initiate-a-user-mouse-driven-move-or-resize-for-custom-window-borders-o#40250654
wParam = SC_SIZE;
switch (edge) {
case uiWindowResizeEdgeLeft,
case uiWindowResizeEdgeLeft:
wParam |= 1;
break
case uiWindowResizeEdgeTop,
break;
case uiWindowResizeEdgeTop:
wParam |= 3;
break
case uiWindowResizeEdgeRight,
break;
case uiWindowResizeEdgeRight:
wParam |= 2;
break
case uiWindowResizeEdgeBottom,
break;
case uiWindowResizeEdgeBottom:
wParam |= 6;
break
case uiWindowResizeEdgeTopLeft,
break;
case uiWindowResizeEdgeTopLeft:
wParam |= 4;
break
case uiWindowResizeEdgeTopRight,
break;
case uiWindowResizeEdgeTopRight:
wParam |= 5;
break
case uiWindowResizeEdgeBottomLeft,
break;
case uiWindowResizeEdgeBottomLeft:
wParam |= 7;
break
break;
case uiWindowResizeEdgeBottomRight:
wParam |= 8;
break
break;
}
SendMessageW(toplevel, WM_SYSCOMMAND,
wParam, 0);