Fixed a memory leak in the file dialog.
This commit is contained in:
parent
5fce6fb707
commit
954294e355
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue