owner drawn context menus for lean explorer version

svn path=/trunk/; revision=13440
This commit is contained in:
Martin Fuchs 2005-02-06 14:03:25 +00:00
parent 24ed9a6f95
commit 97715243ac
2 changed files with 8 additions and 8 deletions

View file

@ -522,7 +522,7 @@ bool DesktopShellView::InitDragDrop()
return true;
}
LRESULT DesktopShellView::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
LRESULT DesktopShellView::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
{
switch(nmsg) {
case WM_CONTEXTMENU:
@ -599,12 +599,12 @@ bool DesktopShellView::DoContextMenu(int x, int y, CtxMenuInterfaces& cm_ifs)
HRESULT DesktopShellView::DoDesktopContextMenu(int x, int y)
{
IContextMenu* pcm1;
IContextMenu* pcm;
HRESULT hr = DesktopFolder()->GetUIObjectOf(_hwnd, 0, NULL, IID_IContextMenu, NULL, (LPVOID*)&pcm1);
HRESULT hr = DesktopFolder()->GetUIObjectOf(_hwnd, 0, NULL, IID_IContextMenu, NULL, (LPVOID*)&pcm);
if (SUCCEEDED(hr)) {
IContextMenu* pcm = _cm_ifs.query_interfaces(pcm1);
pcm = _cm_ifs.query_interfaces(pcm);
HMENU hmenu = CreatePopupMenu();

View file

@ -523,13 +523,13 @@ IContextMenu* CtxMenuInterfaces::query_interfaces(IContextMenu* pcm1)
HRESULT ShellFolderContextMenu(IShellFolder* shell_folder, HWND hwndParent, int cidl,
LPCITEMIDLIST* apidl, int x, int y, CtxMenuInterfaces& cm_ifs)
{
IContextMenu* pcm1;
IContextMenu* pcm;
HRESULT hr = shell_folder->GetUIObjectOf(hwndParent, cidl, apidl, IID_IContextMenu, NULL, (LPVOID*)&pcm1);
// HRESULT hr = CDefFolderMenu_Create2(dir?dir->_pidl:DesktopFolder(), hwndParent, 1, &pidl, shell_folder, NULL, 0, NULL, &pcm1);
HRESULT hr = shell_folder->GetUIObjectOf(hwndParent, cidl, apidl, IID_IContextMenu, NULL, (LPVOID*)&pcm);
// HRESULT hr = CDefFolderMenu_Create2(dir?dir->_pidl:DesktopFolder(), hwndParent, 1, &pidl, shell_folder, NULL, 0, NULL, &pcm);
if (SUCCEEDED(hr)) {
IContextMenu* pcm = cm_ifs.query_interfaces(pcm1);
pcm = cm_ifs.query_interfaces(pcm);
HMENU hmenu = CreatePopupMenu();