- int currentX, currentY;
- GetPosition(¤tX, ¤tY);
- int x1 = x;
- int y1 = y;
- int w1 = width;
- int h1 = height;
-
- if (x == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
- x1 = currentX;
- if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
- y1 = currentY;
-
- // If we're prepared to use the existing size, then...
- if (width == -1 && height == -1 && ((sizeFlags & wxSIZE_AUTO) != wxSIZE_AUTO))
- {
- GetSize(&w1, &h1);
- }
-
- // Deal with default size (using -1 values)
- if (w1<=0)
- w1 = DEFAULT_ITEM_WIDTH;
-
- if (h1<=0)
- h1 = DEFAULT_ITEM_HEIGHT;
-
- MoveWindow((HWND) GetHWND(), x1, y1, w1, h1, TRUE);