mirror of
https://github.com/reactos/reactos.git
synced 2025-07-10 12:44:21 +00:00
[SHELL32] Don't leak SetProp (#7347)
This commit is contained in:
parent
042a025835
commit
d4815873fe
2 changed files with 4 additions and 4 deletions
|
@ -681,7 +681,7 @@ BrFolder_OnInitDialog(HWND hWnd, BrFolder *info)
|
||||||
LPBROWSEINFOW lpBrowseInfo = info->lpBrowseInfo;
|
LPBROWSEINFOW lpBrowseInfo = info->lpBrowseInfo;
|
||||||
|
|
||||||
info->hWnd = hWnd;
|
info->hWnd = hWnd;
|
||||||
SetPropW(hWnd, L"__WINE_BRSFOLDERDLG_INFO", info);
|
SetWindowLongPtrW(hWnd, DWLP_USER, (LONG_PTR)info);
|
||||||
|
|
||||||
if (lpBrowseInfo->ulFlags & BIF_NEWDIALOGSTYLE)
|
if (lpBrowseInfo->ulFlags & BIF_NEWDIALOGSTYLE)
|
||||||
FIXME("flags BIF_NEWDIALOGSTYLE partially implemented\n");
|
FIXME("flags BIF_NEWDIALOGSTYLE partially implemented\n");
|
||||||
|
@ -1225,7 +1225,7 @@ BrFolderDlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
if (uMsg == WM_INITDIALOG)
|
if (uMsg == WM_INITDIALOG)
|
||||||
return BrFolder_OnInitDialog(hWnd, (BrFolder *)lParam);
|
return BrFolder_OnInitDialog(hWnd, (BrFolder *)lParam);
|
||||||
|
|
||||||
BrFolder *info = (BrFolder *)GetPropW(hWnd, L"__WINE_BRSFOLDERDLG_INFO");
|
BrFolder *info = (BrFolder *)GetWindowLongPtrW(hWnd, DWLP_USER);
|
||||||
if (!info)
|
if (!info)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
@ -135,7 +135,7 @@ static INT_PTR ConfirmMsgBox_Paint(HWND hDlg)
|
||||||
/* this will remap the rect to dialog coords */
|
/* this will remap the rect to dialog coords */
|
||||||
MapWindowPoints(GetDlgItem(hDlg, IDC_YESTOALL_MESSAGE), hDlg, (LPPOINT)&r, 2);
|
MapWindowPoints(GetDlgItem(hDlg, IDC_YESTOALL_MESSAGE), hDlg, (LPPOINT)&r, 2);
|
||||||
hOldFont = (HFONT)SelectObject(hdc, (HFONT)SendDlgItemMessageW(hDlg, IDC_YESTOALL_MESSAGE, WM_GETFONT, 0, 0));
|
hOldFont = (HFONT)SelectObject(hdc, (HFONT)SendDlgItemMessageW(hDlg, IDC_YESTOALL_MESSAGE, WM_GETFONT, 0, 0));
|
||||||
DrawTextW(hdc, (LPWSTR)GetPropW(hDlg, L"WINE_CONFIRM"), -1, &r, DT_NOPREFIX | DT_PATH_ELLIPSIS | DT_WORDBREAK);
|
DrawTextW(hdc, (LPWSTR)GetWindowLongPtrW(hDlg, DWLP_USER), -1, &r, DT_NOPREFIX | DT_PATH_ELLIPSIS | DT_WORDBREAK);
|
||||||
SelectObject(hdc, hOldFont);
|
SelectObject(hdc, hOldFont);
|
||||||
EndPaint(hDlg, &ps);
|
EndPaint(hDlg, &ps);
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ static INT_PTR ConfirmMsgBox_Init(HWND hDlg, LPARAM lParam)
|
||||||
|
|
||||||
SetWindowTextW(hDlg, info->lpszCaption);
|
SetWindowTextW(hDlg, info->lpszCaption);
|
||||||
ShowWindow(GetDlgItem(hDlg, IDC_YESTOALL_MESSAGE), SW_HIDE);
|
ShowWindow(GetDlgItem(hDlg, IDC_YESTOALL_MESSAGE), SW_HIDE);
|
||||||
SetPropW(hDlg, L"WINE_CONFIRM", info->lpszText);
|
SetWindowLongPtrW(hDlg, DWLP_USER, (LONG_PTR)info->lpszText);
|
||||||
SendDlgItemMessageW(hDlg, IDC_YESTOALL_ICON, STM_SETICON, (WPARAM)info->hIcon, 0);
|
SendDlgItemMessageW(hDlg, IDC_YESTOALL_ICON, STM_SETICON, (WPARAM)info->hIcon, 0);
|
||||||
|
|
||||||
/* compute the text height and resize the dialog */
|
/* compute the text height and resize the dialog */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue