Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
menu.cpp
Package: shell.rar [view]
Upload User: xhy777
Upload Date: 2007-02-14
Package Size: 24088k
Code Size: 2k
Category:
Windows Kernel
Development Platform:
Visual C++
- #include "folder.h"
- #include "utils.h"
- #include <mluisupp.h>
- ///////////////////////////////////////////////////////////////////////////////
- // IContextMenu methods
- HRESULT CControlFolder::QueryContextMenu(
- HMENU hmenu,
- UINT indexMenu,
- UINT idCmdFirst,
- UINT idCmdLast,
- UINT uFlags)
- {
- USHORT cItems = 0;
- DebugMsg(DM_TRACE, TEXT("cf - cm - QueryContextMenu() called."));
- if (uFlags == CMF_NORMAL)
- {
- HMENU hCtrlMenu = LoadMenu(MLGetHinst(), MAKEINTRESOURCE(IDR_CONTROLFOLDER));
- if (hmenu)
- {
- MENUITEMINFO mii;
- mii.cbSize = sizeof(mii);
- mii.fMask = MIIM_ID;
- mii.wID = SFVIDM_MENU_ARRANGE;
- SetMenuItemInfo(hCtrlMenu, 0, TRUE, &mii);
- cItems = (USHORT)MergeMenuHierarchy(hmenu, hCtrlMenu, idCmdFirst, idCmdLast);
- DestroyMenu(hCtrlMenu);
- }
- }
- SetMenuDefaultItem(hmenu, indexMenu, MF_BYPOSITION);
- return ResultFromShort(cItems); // number of menu items
- }
- HRESULT CControlFolder::InvokeCommand(LPCMINVOKECOMMANDINFO pici)
- {
- // We don't deal with the VERBONLY case
- DebugMsg(DM_TRACE, TEXT("cf - cm - InvokeCommand() called."));
- Assert((DWORD_PTR)(pici->lpVerb) <= 0xFFFF);
- int idCmd;
- if ((DWORD_PTR)(pici->lpVerb) > 0xFFFF)
- idCmd = -1;
- else
- idCmd = LOWORD(pici->lpVerb);
- return ControlFolderView_Command(pici->hwnd, idCmd);
- }
- HRESULT CControlFolder::GetCommandString(
- UINT_PTR idCmd,
- UINT uFlags,
- UINT *pwReserved,
- LPTSTR pszName,
- UINT cchMax)
- {
- HRESULT hres = E_FAIL;
- DebugMsg(DM_TRACE, TEXT("cf - cm - GetCommandString() called."));
- if (uFlags == GCS_HELPTEXT)
- {
- MLLoadString((UINT) (idCmd + IDS_HELP_SORTBYNAME), pszName, cchMax);
- hres = S_OK;
- }
- return hres;
- }