Change wxMSW to use WidthDefault and HeightDefault for window sizes,

like the other platforms do.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-03-05 21:17:06 +00:00
parent 723f8e3a33
commit 426936d182

View File

@@ -2993,8 +2993,6 @@ bool wxWindowMSW::MSWGetCreateWindowCoords(const wxPoint& pos,
{
// yes, those are just some arbitrary hardcoded numbers
static const int DEFAULT_Y = 200;
static const int DEFAULT_W = 400;
static const int DEFAULT_H = 250;
bool nonDefault = false;
@@ -3032,8 +3030,8 @@ bool wxWindowMSW::MSWGetCreateWindowCoords(const wxPoint& pos,
this and ignore any attempts to change the window size to the size it
already has - so no WM_SIZE would be sent.
*/
if ( size.x == -1 )
{
// we don't use CW_USEDEFAULT here for several reasons:
//
// 1. it results in huge frames on modern screens (1000*800 is not
@@ -3051,17 +3049,12 @@ bool wxWindowMSW::MSWGetCreateWindowCoords(const wxPoint& pos,
// level window in some smart way which we can't do, but we can
// guess a reasonably good size for a new window just as well
// ourselves
w = DEFAULT_W;
h = DEFAULT_H;
}
else
if ( size.x == -1 || size.y == -1)
{
// and, again as above, we can't set the height to CW_USEDEFAULT here
w = size.x;
h = size.y == -1 ? DEFAULT_H : size.y;
nonDefault = true;
}
w = WidthDefault(size.x);
h = HeightDefault(size.y);
AdjustForParentClientOrigin(x, y);