From f1a624d59f351590faa5e028255fbfa55d77f069 Mon Sep 17 00:00:00 2001 From: "Guy L. Albertelli" Date: Wed, 27 Feb 2002 01:20:54 +0000 Subject: [PATCH] Fix the strange case in WIN_FixCoordinates where x and cx are not default but cy is CW_USEDEFAULT. --- windows/win.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/windows/win.c b/windows/win.c index 4572666b8da..0bc438f1c13 100644 --- a/windows/win.c +++ b/windows/win.c @@ -848,6 +848,19 @@ static void WIN_FixCoordinates( CREATESTRUCTA *cs, INT *sw) } } } + else + { + /* neither x nor cx are default. Check the y values . + * In the trace we see Outlook and Outlook Express using + * cy set to CW_USEDEFAULT when opening the address book. + */ + if (cs->cy == CW_USEDEFAULT || cs->cy == CW_USEDEFAULT16) { + RECT r; + FIXME("Strange use of CW_USEDEFAULT in nHeight\n"); + SystemParametersInfoA( SPI_GETWORKAREA, 0, &r, 0); + cs->cy = (((r.bottom - r.top) * 3) / 4) - cs->y; + } + } } /***********************************************************************