Fix for file dialog

Maxime Bellengé maxime.bellenge at wanadoo.fr
Sun Mar 9 17:32:22 CST 2003


This fixes a bug in how filedlg95 handles child components. At least,
winzip open dialog box looks much better.

ChangeLog:
- Fix how the size of the window is computed.

-- 
Maxime Bellengé <maxime.bellenge at wanadoo.fr>

How the hell can I stop evolution to do line wrapping ?
Anyway, I have attached a proper patch.


Index: dlls/commdlg/filedlg95.c
===================================================================
RCS file: /home/wine/wine/dlls/commdlg/filedlg95.c,v
retrieving revision 1.90
diff -u -r1.90 filedlg95.c
--- dlls/commdlg/filedlg95.c	7 Mar 2003 20:29:31 -0000	1.90
+++ dlls/commdlg/filedlg95.c	9 Mar 2003 23:21:43 -0000
@@ -540,19 +540,19 @@
     else
     {
       if( (GetWindow(hwndChildDlg,GW_CHILD)) == NULL) return;
-
       SetRectEmpty(&rectTemp);
       ptParentClient.x =
max((rectParent.right-rectParent.left),(rectChild.right-rectChild.left));
       ptParentClient.y = (rectParent.bottom-rectParent.top) +
(rectChild.bottom-rectChild.top);
       ptMoveCtl.y = rectParent.bottom-rectParent.top;
-      ptMoveCtl.x=0;
+      ptMoveCtl.x=0;     
+      SetRect(&rectTemp,0,0,ptParentClient.x,ptMoveCtl.y);
     }
    
SetRect(&rectParent,rectParent.left,rectParent.top,rectParent.left+ptParentClient.x,rectParent.top+ptParentClient.y); AdjustWindowRectEx(&rectParent,GetWindowLongA(hwndParentDlg,GWL_STYLE),FALSE,GetWindowLongA(hwndParentDlg,GWL_EXSTYLE));
 
-    SetWindowPos(hwndChildDlg, 0, 0,0, ptParentClient.x +
ptMoveCtl.x,ptParentClient.y + ptMoveCtl.y, SWP_NOZORDER );
-    SetWindowPos(hwndParentDlg, 0, rectParent.left,rectParent.top,
(rectParent.right- rectParent.left) + ptMoveCtl.x,
-        (rectParent.bottom-rectParent.top) + ptMoveCtl.y,SWP_NOMOVE |
SWP_NOZORDER);
+    SetWindowPos(hwndChildDlg, 0, 0,0, ptParentClient.x +
ptMoveCtl.x,ptParentClient.y, SWP_NOZORDER );
+    SetWindowPos(hwndParentDlg, 0, rectParent.left,rectParent.top,
(rectParent.right- rectParent.left) + ptMoveCtl.x,	
+		 (rectParent.bottom-rectParent.top),SWP_NOMOVE | SWP_NOZORDER);
 
     hwndChild = GetWindow(hwndChildDlg,GW_CHILD);
     if(hwndStc32)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: filedlg95.patch
Type: text/x-patch
Size: 1764 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20030310/f83b8652/filedlg95.bin


More information about the wine-patches mailing list