mirror of
https://github.com/reactos/reactos.git
synced 2025-07-29 16:52:11 +00:00
[BROWSEUI]
* Fix icon leak of the returned old icon from WM_SETICON. [RSHELL] * Add two debug prints (not hit). [FILEBROWSER] [EXPLORER-NEW] * Free PWSTR pointers after exiting. svn path=/branches/shell-experiments/; revision=64940
This commit is contained in:
parent
1cd79168e1
commit
ac06c3cf99
4 changed files with 34 additions and 4 deletions
|
@ -392,14 +392,22 @@ _tWinMain(IN HINSTANCE hInstance,
|
|||
if (GetShellWindow() == NULL)
|
||||
CreateShellDesktop = TRUE;
|
||||
|
||||
/* FIXME - initialize SSO Thread */
|
||||
|
||||
if (!CreateShellDesktop)
|
||||
{
|
||||
EXPLORER_CMDLINE_PARSE_RESULTS parseResults = { 0 };
|
||||
|
||||
if (SHExplorerParseCmdLine(&parseResults))
|
||||
return SHCreateFromDesktop(&parseResults);
|
||||
|
||||
if (parseResults.strPath)
|
||||
SHFree(parseResults.strPath);
|
||||
|
||||
if (parseResults.pidlPath)
|
||||
ILFree(parseResults.pidlPath);
|
||||
|
||||
if (parseResults.pidlRoot)
|
||||
ILFree(parseResults.pidlRoot);
|
||||
|
||||
}
|
||||
|
||||
if (RegOpenKey(HKEY_CURRENT_USER,
|
||||
|
|
|
@ -37,5 +37,14 @@ int _tmain(int argc, _TCHAR* argv[])
|
|||
return SHCreateFromDesktop(&parseResults);
|
||||
}
|
||||
|
||||
if (parseResults.strPath)
|
||||
SHFree(parseResults.strPath);
|
||||
|
||||
if (parseResults.pidlPath)
|
||||
ILFree(parseResults.pidlPath);
|
||||
|
||||
if (parseResults.pidlRoot)
|
||||
ILFree(parseResults.pidlRoot);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -641,6 +641,16 @@ LRESULT CMenuFocusManager::GetMsgHook(INT nCode, WPARAM hookWParam, LPARAM hookL
|
|||
|
||||
HRESULT CMenuFocusManager::PlaceHooks()
|
||||
{
|
||||
if (m_hMsgFilterHook)
|
||||
{
|
||||
WARN("GETMESSAGE hook already placed!\n");
|
||||
return S_OK;
|
||||
}
|
||||
if (m_hMsgFilterHook)
|
||||
{
|
||||
WARN("MSGFILTER hook already placed!\n");
|
||||
return S_OK;
|
||||
}
|
||||
if (m_current->type == TrackedMenuEntry)
|
||||
{
|
||||
TRACE("Entering MSGFILTER hook...\n");
|
||||
|
|
|
@ -1078,8 +1078,11 @@ HRESULT CShellBrowser::BrowseToPath(IShellFolder *newShellFolder,
|
|||
HICON icSmall = ImageList_GetIcon(himlSmall, indexOpen, 0);
|
||||
HICON icLarge = ImageList_GetIcon(himlLarge, indexOpen, 0);
|
||||
|
||||
SendMessage(WM_SETICON, ICON_SMALL, reinterpret_cast<LPARAM>(icSmall));
|
||||
SendMessage(WM_SETICON, ICON_BIG, reinterpret_cast<LPARAM>(icLarge));
|
||||
HICON oldSmall = (HICON)SendMessage(WM_SETICON, ICON_SMALL, reinterpret_cast<LPARAM>(icSmall));
|
||||
HICON oldLarge = (HICON)SendMessage(WM_SETICON, ICON_BIG, reinterpret_cast<LPARAM>(icLarge));
|
||||
|
||||
DestroyIcon(oldSmall);
|
||||
DestroyIcon(oldLarge);
|
||||
}
|
||||
|
||||
// TODO: Update the window icon
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue