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:
2 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); 
Note: See TracChangeset for help on using the changeset viewer.