[PATCH] filedlg95 CreateTemplateDialog

Gerard Patel gerard.patel at nerim.net
Mon Dec 3 14:08:45 CST 2001


After last server restructuration, this code has begun to spit 
strange warnings about bad class name. However, running with
-debugmsg +relay makes these warning disappear so chance
are that the relation is only random, the code has a problem that
was only revealed by last patch on my computer.


ChangeLog:

	* dlls/commdlg/filedlg95.c
               Initialize dialog data correctly in CreateTemplateDialog


-------------- next part --------------
Index: dlls/commdlg/filedlg95.c
===================================================================
RCS file: /home/wine/wine/dlls/commdlg/filedlg95.c,v
retrieving revision 1.61
diff -u -r1.61 filedlg95.c
--- dlls/commdlg/filedlg95.c	2001/08/18 16:07:06	1.61
+++ dlls/commdlg/filedlg95.c	2001/12/03 17:24:35
@@ -698,17 +698,22 @@
     else if( IsHooked(fodInfos))
     {
       RECT rectHwnd;
-      DLGTEMPLATE tmplate;
+      struct  {
+         DLGTEMPLATE tmplate;
+         WORD menu,class,title;
+         } temp;
       GetClientRect(hwnd,&rectHwnd);
-      tmplate.style = WS_CHILD | WS_CLIPSIBLINGS;
-      tmplate.dwExtendedStyle = 0;
-      tmplate.cdit = 0;
-      tmplate.x = 0;
-      tmplate.y = 0;
-      tmplate.cx = rectHwnd.right-rectHwnd.left;
-      tmplate.cy = rectHwnd.bottom-rectHwnd.top;
-       
-      return CreateDialogIndirectParamA(fodInfos->ofnInfos->hInstance,&tmplate,hwnd,(DLGPROC)FileOpenDlgProcUserTemplate,(LPARAM)fodInfos);
+      temp.tmplate.style = WS_CHILD | WS_CLIPSIBLINGS;
+      temp.tmplate.dwExtendedStyle = 0;
+      temp.tmplate.cdit = 0;
+      temp.tmplate.x = 0;
+      temp.tmplate.y = 0;
+      temp.tmplate.cx = rectHwnd.right-rectHwnd.left;
+      temp.tmplate.cy = rectHwnd.bottom-rectHwnd.top;
+      temp.menu = temp.class = temp.title = 0;
+      hChildDlg = CreateDialogIndirectParamA(fodInfos->ofnInfos->hInstance,&temp,
+                  hwnd,(DLGPROC)FileOpenDlgProcUserTemplate,(LPARAM)fodInfos);
+      return hChildDlg;
     }
     return (HWND)NULL;
 }
-------------- next part --------------



More information about the wine-patches mailing list