Commit 954294e3 authored by Francis Beaudet's avatar Francis Beaudet Committed by Alexandre Julliard

Fixed a memory leak in the file dialog.

parent 5fce6fb7
......@@ -36,6 +36,10 @@ typedef struct {
} user_fr;
} COMDLG32_FR_Data;
#define PD32_PRINT_TITLE 7000
#define PD32_PRINT_ALL_X_PAGES 7001
#define PD32_INVALID_PAGE_RANGE 7003
#include "commctrl.h"
extern HDPA (WINAPI* COMDLG32_DPA_Create) (INT);
extern LPVOID (WINAPI* COMDLG32_DPA_GetPtr) (const HDPA, INT);
......@@ -47,5 +51,6 @@ extern BOOL (WINAPI* COMDLG32_DPA_Destroy) (const HDPA);
extern HICON (WINAPI* COMDLG32_ImageList_GetIcon) (HIMAGELIST, INT, UINT);
extern HIMAGELIST (WINAPI *COMDLG32_ImageList_LoadImageA) (HINSTANCE, LPCSTR, INT, INT, COLORREF, UINT, UINT);
extern BOOL (WINAPI* COMDLG32_ImageList_Draw) (HIMAGELIST himl, int i, HDC hdcDest, int x, int y, UINT fStyle);
extern BOOL (WINAPI* COMDLG32_ImageList_Destroy) (HIMAGELIST himl);
#endif
......@@ -32,6 +32,7 @@ BOOL (WINAPI* COMDLG32_DPA_Destroy) (const HDPA);
HICON (WINAPI* COMDLG32_ImageList_GetIcon) (HIMAGELIST, INT, UINT);
HIMAGELIST (WINAPI *COMDLG32_ImageList_LoadImageA) (HINSTANCE, LPCSTR, INT, INT, COLORREF, UINT, UINT);
BOOL (WINAPI* COMDLG32_ImageList_Draw) (HIMAGELIST himl, int i, HDC hdcDest, int x, int y, UINT fStyle);
BOOL (WINAPI* COMDLG32_ImageList_Destroy) (HIMAGELIST himl);
/***********************************************************************
* COMDLG32_DllEntryPoint (COMDLG32.entry)
......@@ -91,6 +92,7 @@ BOOL WINAPI COMDLG32_DllEntryPoint(HINSTANCE hInstance, DWORD Reason, LPVOID Res
COMDLG32_ImageList_GetIcon=(void*)GetProcAddress(COMCTL32_hInstance,"ImageList_GetIcon");
COMDLG32_ImageList_LoadImageA=(void*)GetProcAddress(COMCTL32_hInstance,"ImageList_LoadImageA");
COMDLG32_ImageList_Draw=(void*)GetProcAddress(COMCTL32_hInstance,"ImageList_Draw");
COMDLG32_ImageList_Destroy=(void*)GetProcAddress(COMCTL32_hInstance,"ImageList_Destroy");
break;
case DLL_PROCESS_DETACH:
......
......@@ -783,6 +783,8 @@ static LRESULT FILEDLG95_InitUI(HWND hwnd)
/* Detail view icon */
if((hicon = COMDLG32_ImageList_GetIcon(himlToolbar,3,ILD_NORMAL)))
SendDlgItemMessageA(hwnd,IDC_DETAILS,BM_SETIMAGE,(WPARAM)IMAGE_ICON,(LPARAM)hicon);
/* Cleanup */
COMDLG32_ImageList_Destroy(himlToolbar);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment