- 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;
-
- AdjustForParentClientOrigin(x1, y1, sizeFlags);
-
- // If we're prepared to use the existing size, then...
- if (width == -1 && height == -1 && ((sizeFlags & wxSIZE_AUTO) != wxSIZE_AUTO))
- {
- GetSize(&w1, &h1);
- }
-
- int cx; // button font dimensions
- int cy;
- wxGetCharSize(GetHWND(), &cx, &cy, GetFont());
-
- int control_width, control_height;
-
- // Ignore height parameter because height doesn't
- // mean 'initially displayed' height, it refers to the
- // drop-down menu as well. The wxWindows interpretation
- // is different; also, getting the size returns the
- // _displayed_ size (NOT the drop down menu size)
- // so setting-getting-setting size would not work.
- h1 = -1;
-
- // Deal with default size (using -1 values)
- if (width <= 0)
- {
- // Find the longest string
- if (m_noStrings == 0)