ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

static VOID AddStartContextMenuItems ( IN HWND  hWndOwner,
IN HMENU  hPopup 
) [static]

Definition at line 139 of file startmnu.c.

Referenced by CreateStartContextMenu().

{
    TCHAR szBuf[MAX_PATH];
    HRESULT hRet;

    /* Add the "Open All Users" menu item */
    if (LoadString(hExplorerInstance,
                   IDS_PROPERTIES,
                   szBuf,
                   sizeof(szBuf) / sizeof(szBuf[0])))
    {
        AppendMenu(hPopup,
                   MF_STRING,
                   ID_SHELL_CMD_PROPERTIES,
                   szBuf);
    }

    if (!SHRestricted(REST_NOCOMMONGROUPS))
    {
        /* Check if we should add menu items for the common start menu */
        hRet = SHGetFolderPath(hWndOwner,
                               CSIDL_COMMON_STARTMENU,
                               NULL,
                               SHGFP_TYPE_CURRENT,
                               szBuf);
        if (SUCCEEDED(hRet) && hRet != S_FALSE)
        {
            /* The directory exists, but only show the items if the
               user can actually make any changes to the common start
               menu. This is most likely only the case if the user
               has administrative rights! */
            if (IsUserAnAdmin())
            {
                AppendMenu(hPopup,
                           MF_SEPARATOR,
                           0,
                           NULL);

                /* Add the "Open All Users" menu item */
                if (LoadString(hExplorerInstance,
                               IDS_OPEN_ALL_USERS,
                               szBuf,
                               sizeof(szBuf) / sizeof(szBuf[0])))
                {
                    AppendMenu(hPopup,
                               MF_STRING,
                               ID_SHELL_CMD_OPEN_ALL_USERS,
                               szBuf);
                }

                /* Add the "Explore All Users" menu item */
                if (LoadString(hExplorerInstance,
                               IDS_EXPLORE_ALL_USERS,
                               szBuf,
                               sizeof(szBuf) / sizeof(szBuf[0])))
                {
                    AppendMenu(hPopup,
                               MF_STRING,
                               ID_SHELL_CMD_EXPLORE_ALL_USERS,
                               szBuf);
                }
            }
        }
    }
}

Generated on Sun May 27 2012 04:46:22 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.