Bugfix for default size for 16-bit MDI windows
Joshua Thielen
thielen at netprince.net
Sat Sep 15 07:23:51 CDT 2001
Hello,
This patch was tested with the 16-bit SDK app, blandmdi.
Changelog: changed MDICreateChild to support CW_USEDEFAULT for 16-bit
MDI windows.
Modified files: wine/windows/mdi.c
Josh Thielen
-------------- next part --------------
Index: mdi.c
===================================================================
RCS file: /home/wine/wine/windows/mdi.c,v
retrieving revision 1.85
diff -u -r1.85 mdi.c
--- mdi.c 2001/08/24 19:28:21 1.85
+++ mdi.c 2001/09/15 11:01:20
@@ -481,18 +481,7 @@
TRACE("origin %i,%i - dim %i,%i, style %08lx\n",
cs->x, cs->y, cs->cx, cs->cy, cs->style);
- /* calculate placement */
- MDI_CalcDefaultChildPos(parent, ci->nTotalCreated++, pos, 0);
- if (cs->cx == CW_USEDEFAULT || !cs->cx) cs->cx = pos[1].x;
- if (cs->cy == CW_USEDEFAULT || !cs->cy) cs->cy = pos[1].y;
-
- if( cs->x == CW_USEDEFAULT )
- {
- cs->x = pos[0].x;
- cs->y = pos[0].y;
- }
-
/* restore current maximized child */
if( (style & WS_VISIBLE) && ci->hwndChildMaximized )
{
@@ -521,10 +510,22 @@
WS_CLIPCHILDREN | WS_DISABLED | WS_VSCROLL | WS_HSCROLL );
style |= (WS_VISIBLE | WS_OVERLAPPEDWINDOW);
}
+ WIN_ReleaseWndPtr( wndParent );
+ /* calculate placement */
+ MDI_CalcDefaultChildPos(parent, ci->nTotalCreated++, pos, 0);
+
if( wndParent->flags & WIN_ISWIN32 )
{
- WIN_ReleaseWndPtr( wndParent );
+ if (cs->cx == CW_USEDEFAULT || !cs->cx) cs->cx = pos[1].x;
+ if (cs->cy == CW_USEDEFAULT || !cs->cy) cs->cy = pos[1].y;
+
+ if( cs->x == CW_USEDEFAULT )
+ {
+ cs->x = pos[0].x;
+ cs->y = pos[0].y;
+ }
+
if(unicode)
{
MDICREATESTRUCTW *csW = (MDICREATESTRUCTW *)cs;
@@ -541,8 +542,16 @@
{
MDICREATESTRUCT16 *cs16;
LPSTR title, cls;
+
+ if (cs->cx == CW_USEDEFAULT16 || !cs->cx) cs->cx = pos[1].x;
+ if (cs->cy == CW_USEDEFAULT16 || !cs->cy) cs->cy = pos[1].y;
+
+ if( cs->x == CW_USEDEFAULT16 )
+ {
+ cs->x = pos[0].x;
+ cs->y = pos[0].y;
+ }
- WIN_ReleaseWndPtr( wndParent );
cs16 = SEGPTR_NEW(MDICREATESTRUCT16);
STRUCT32_MDICREATESTRUCT32Ato16( cs, cs16 );
title = SEGPTR_STRDUP( cs->szTitle );
More information about the wine-patches
mailing list