Changeset 2216


Ignore:
Timestamp:
6/27/2010 1:10:26 PM (2 years ago)
Author:
lowjoel
Message:

Forward-port from Eraser 6.0: Don't display the Eraser context menu for the Start Button. Fixes #365: Blank context menu item: Windows XP

Location:
trunk/eraser
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser

  • trunk/eraser/Eraser.Shell/CtxMenu.cpp

    r2136 r2216  
    173173        SelectedFiles = GetHDropPaths(hDrop); 
    174174 
     175        //Check if the selected files is only one item long and if that item is the 
     176        //Start button (for Windows XP) 
     177        if (SelectedFiles.size() == 1) 
     178        { 
     179            wchar_t startMenuPath[MAX_PATH]; 
     180            if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_STARTMENU, NULL, 
     181                SHGFP_TYPE_CURRENT, startMenuPath))) 
     182            { 
     183                if (SelectedFiles.front() == startMenuPath) 
     184                    //Yes, it is. Don't display the Eraser context menu for this. 
     185                    return E_INVALIDARG; 
     186            } 
     187        } 
     188 
    175189        //Clean up. 
    176190        GlobalUnlock(stg.hGlobal); 
  • trunk/eraser/Eraser.Shell/ShellExt.vcproj

    r2123 r2216  
    8383                Name="VCLinkerTool" 
    8484                IgnoreImportLibrary="true" 
    85                 AdditionalDependencies="shlwapi.lib comsvcs.lib" 
     85                AdditionalDependencies="shell32.lib shlwapi.lib comsvcs.lib" 
    8686                LinkIncremental="2" 
    8787                ModuleDefinitionFile="$(ProjectDir)DllMain.def" 
     
    174174                Name="VCLinkerTool" 
    175175                IgnoreImportLibrary="true" 
    176                 AdditionalDependencies="shlwapi.lib comsvcs.lib" 
     176                AdditionalDependencies="shell32.lib shlwapi.lib comsvcs.lib" 
    177177                LinkIncremental="2" 
    178178                ModuleDefinitionFile="$(ProjectDir)DllMain.def" 
     
    266266                Name="VCLinkerTool" 
    267267                IgnoreImportLibrary="true" 
    268                 AdditionalDependencies="shlwapi.lib comsvcs.lib" 
     268                AdditionalDependencies="shell32.lib shlwapi.lib comsvcs.lib" 
    269269                LinkIncremental="1" 
    270270                ModuleDefinitionFile="$(ProjectDir)DllMain.def" 
     
    359359                Name="VCLinkerTool" 
    360360                IgnoreImportLibrary="true" 
    361                 AdditionalDependencies="shlwapi.lib comsvcs.lib" 
     361                AdditionalDependencies="shell32.lib shlwapi.lib comsvcs.lib" 
    362362                LinkIncremental="1" 
    363363                ModuleDefinitionFile="$(ProjectDir)DllMain.def" 
Note: See TracChangeset for help on using the changeset viewer.