Changeset 2215


Ignore:
Timestamp:
6/27/2010 1:07:19 PM (20 months ago)
Author:
lowjoel
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/6.0/ShellExt/CtxMenu.cpp

    r1719 r2215  
    219219        } 
    220220 
     221        //Check if the selected files is only one item long and if that item is the 
     222        //Start button (for Windows XP) 
     223        if (SelectedFiles.size() == 1) 
     224        { 
     225            wchar_t startMenuPath[MAX_PATH]; 
     226            if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_STARTMENU, NULL, 
     227                SHGFP_TYPE_CURRENT, startMenuPath))) 
     228            { 
     229                if (SelectedFiles.front() == startMenuPath) 
     230                    //Yes, it is. Don't display the Eraser context menu for this. 
     231                    return E_INVALIDARG; 
     232            } 
     233        } 
     234 
    221235        //Clean up. 
    222236        GlobalUnlock(stg.hGlobal); 
Note: See TracChangeset for help on using the changeset viewer.