git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15475
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
int& x, int& y,
int& w, int& h) const
{
int& x, int& y,
int& w, int& h) const
{
+ static const int DEFAULT_Y = 200;
+ static const int DEFAULT_H = 250;
+
bool nonDefault = FALSE;
if ( pos.x == -1 )
bool nonDefault = FALSE;
if ( pos.x == -1 )
+ // OTOH, if x is not set to CW_USEDEFAULT, y shouldn't be set to it
+ // neither because it is not handled as a special value by Windows then
+ // and so we have to choose some default value for it
- y = pos.y == -1 ? CW_USEDEFAULT : pos.y;
+ y = pos.y == -1 ? DEFAULT_Y : pos.y;
- // as abobe, h is not used at all in this case anyhow
+ // as above, h is not used at all in this case anyhow
w =
h = CW_USEDEFAULT;
}
else
{
w =
h = CW_USEDEFAULT;
}
else
{
+ // and, again as above, we can't set the height to CW_USEDEFAULT here
- h = size.y == -1 ? CW_USEDEFAULT : size.y;
+ h = size.y == -1 ? DEFAULT_H : size.y;