Alexandre Julliard : user32: Get rid of the 16-bit dialog heap.

Alexandre Julliard julliard at winehq.org
Tue Dec 22 09:59:01 CST 2009


Module: wine
Branch: master
Commit: b615656f0093cd7d9f3af5a6bdf9727cd92883dd
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b615656f0093cd7d9f3af5a6bdf9727cd92883dd

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Dec 22 15:18:30 2009 +0100

user32: Get rid of the 16-bit dialog heap.

Edit controls don't allocate memory on the 16-bit heap anyway.

---

 dlls/user32/controls.h |    1 -
 dlls/user32/defdlg.c   |    7 -------
 dlls/user32/dialog.c   |    1 -
 dlls/user32/dialog16.c |   16 ----------------
 4 files changed, 0 insertions(+), 25 deletions(-)

diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h
index c3fd4ec..f9752ee 100644
--- a/dlls/user32/controls.h
+++ b/dlls/user32/controls.h
@@ -231,7 +231,6 @@ typedef struct tagDIALOGINFO
     UINT      yBaseUnit;
     INT       idResult;    /* EndDialog() result / default pushbutton ID */
     UINT      flags;       /* EndDialog() called for this dialog */
-    HGLOBAL16 hDialogHeap;
 } DIALOGINFO;
 
 #define DF_END  0x0001
diff --git a/dlls/user32/defdlg.c b/dlls/user32/defdlg.c
index 3db59ad..faf5026 100644
--- a/dlls/user32/defdlg.c
+++ b/dlls/user32/defdlg.c
@@ -234,12 +234,6 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam,
             {
                 WND *wndPtr;
 
-                /* Free dialog heap (if created) */
-                if (dlgInfo->hDialogHeap)
-                {
-                    GlobalUnlock16(dlgInfo->hDialogHeap);
-                    GlobalFree16(dlgInfo->hDialogHeap);
-                }
                 if (dlgInfo->hUserFont) DeleteObject( dlgInfo->hUserFont );
                 if (dlgInfo->hMenu) DestroyMenu( dlgInfo->hMenu );
                 HeapFree( GetProcessHeap(), 0, dlgInfo );
@@ -347,7 +341,6 @@ DIALOGINFO *DIALOG_get_info( HWND hwnd, BOOL create )
         dlgInfo->yBaseUnit   = 0;
         dlgInfo->idResult    = 0;
         dlgInfo->flags       = 0;
-        dlgInfo->hDialogHeap = 0;
         wndPtr->dlgInfo = dlgInfo;
         wndPtr->flags |= WIN_ISDIALOG;
     }
diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c
index 021955b..f0d194d 100644
--- a/dlls/user32/dialog.c
+++ b/dlls/user32/dialog.c
@@ -674,7 +674,6 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
     dlgInfo->yBaseUnit   = yBaseUnit;
     dlgInfo->idResult    = IDOK;
     dlgInfo->flags       = flags;
-    dlgInfo->hDialogHeap = 0;
 
     if (template.helpId) SetWindowContextHelpId( hwnd, template.helpId );
 
diff --git a/dlls/user32/dialog16.c b/dlls/user32/dialog16.c
index 189ba77..fc6ad1e 100644
--- a/dlls/user32/dialog16.c
+++ b/dlls/user32/dialog16.c
@@ -151,22 +151,6 @@ static BOOL DIALOG_CreateControls16( HWND hwnd, LPCSTR template,
         SEGPTR segptr;
 
         template = DIALOG_GetControl16( template, &info );
-        if (HIWORD(info.className) && !strcmp( info.className, "EDIT") &&
-            !(GetWindowLongW( hwnd, GWL_STYLE ) & DS_LOCALEDIT))
-        {
-            if (!dlgInfo->hDialogHeap)
-            {
-                dlgInfo->hDialogHeap = GlobalAlloc16(GMEM_FIXED, 0x10000);
-                if (!dlgInfo->hDialogHeap)
-                {
-                    ERR("Insufficient memory to create heap for edit control\n" );
-                    continue;
-                }
-                LocalInit16(dlgInfo->hDialogHeap, 0, 0xffff);
-            }
-            instance = dlgInfo->hDialogHeap;
-        }
-
         segptr = MapLS( info.data );
         hwndCtrl = WIN_Handle32( CreateWindowEx16( WS_EX_NOPARENTNOTIFY,
                                                    info.className, info.windowName,




More information about the wine-cvs mailing list