ATL Windows Shell context menu handler (ATLShellExtContextMenuHandler)

The code sample illustrates how to create a Windows Shell context menu handler in VC++ (ATL)

C++ (62.4 KB)
 
 
 
 
 
(0)
9,603 times
Add to favorites
5/5/2011
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Not working this project in Windows 8-10
    1 Posts | Last post September 14, 2015
    • I have some problems and wondering.
      
      1. I try to add context menu in windows 8, 8.1 and 10 but I can't add context menu.
      2. Why this sample code include another .rgs file(Win7DeviceContextMenuEx.rgs)?
  • Running this on x64 system
    1 Posts | Last post August 18, 2014
    • You need to do two things to make it work on x64 machine:
      1. Build as x64 - go to configuration manager (Debug/ Release drop down in Visual Studio) and add new "Active Solution Platform". Select "x64" and "Copy settings from" Win32. Select this new platform for your build (either Debug or Release). This won't build at this point.
      2. Change first parameter of GetCommandString method from UINT to UINT_PTR. First one is int and the second on is long, that's why it matters.
      
      Now the solution should build and load (instantly after regsvr32, no need to restart). You will notice regsvr32 adds your server under HKCR/ClSID node, instead of HKCR/Wow6432node/CLSID.