void ClearFolder(Folder *pFolder) { Item *item = pFolder->items; while (item) { Item* next = item->next; del_item(item, MODE_FOLDER == pFolder->mode); item = next; } pFolder->items = NULL; if (pFolder->id_notify) { remove_change_notify_entry(pFolder->id_notify); pFolder->id_notify = 0; } delete_pidl_list(&pFolder->pidl_list); }
//=========================================================================== void SpecialFolder::register_droptarget(bool set) { if (set) { if (m_pidl_list) { m_droptarget = init_drop_targ(m_hwnd, m_pidl_list->v); m_notify = add_change_notify_entry(m_hwnd, m_pidl_list->v); } } else { if (m_notify) remove_change_notify_entry(m_notify), m_notify = 0; if (m_droptarget) exit_drop_targ(m_droptarget), m_droptarget = NULL; } }