X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=base%2Fshell%2Frshell%2FCStartMenu.cpp;h=da990fa1b4865e7fdee467c156ef3750f18580f3;hp=d1b324c3aa0c453d5f5103b1cacaf8437279d16b;hb=53f74feb2ded34b7bb506928eeac13791ac39d97;hpb=ddb3d908c999f6ede2ee7eba3ed9d41cf291be68 diff --git a/base/shell/rshell/CStartMenu.cpp b/base/shell/rshell/CStartMenu.cpp index d1b324c3aa0..da990fa1b48 100644 --- a/base/shell/rshell/CStartMenu.cpp +++ b/base/shell/rshell/CStartMenu.cpp @@ -25,24 +25,24 @@ /* NOTE: The following constants *MUST NOT* be changed because they're hardcoded and need to be the exact values in order to get the start menu to work! */ +#define IDM_RUN 401 +#define IDM_LOGOFF 402 +#define IDM_UNDOCKCOMPUTER 410 +#define IDM_TASKBARANDSTARTMENU 413 +#define IDM_LASTSTARTMENU_SEPARATOR 450 +#define IDM_DOCUMENTS 501 +#define IDM_HELPANDSUPPORT 503 #define IDM_PROGRAMS 504 +#define IDM_CONTROLPANEL 505 +#define IDM_SHUTDOWN 506 #define IDM_FAVORITES 507 -#define IDM_DOCUMENTS 501 #define IDM_SETTINGS 508 -#define IDM_CONTROLPANEL 505 -#define IDM_SECURITY 5001 -#define IDM_NETWORKCONNECTIONS 557 #define IDM_PRINTERSANDFAXES 510 -#define IDM_TASKBARANDSTARTMENU 413 #define IDM_SEARCH 520 -#define IDM_HELPANDSUPPORT 503 -#define IDM_RUN 401 #define IDM_SYNCHRONIZE 553 -#define IDM_LOGOFF 402 +#define IDM_NETWORKCONNECTIONS 557 #define IDM_DISCONNECT 5000 -#define IDM_UNDOCKCOMPUTER 410 -#define IDM_SHUTDOWN 506 -#define IDM_LASTSTARTMENU_SEPARATOR 450 +#define IDM_SECURITY 5001 /* * TODO: @@ -90,36 +90,48 @@ private: switch (psmd->uId) { - case IDM_PROGRAMS: iconIndex = -20; break; - case IDM_FAVORITES: iconIndex = -173; break; - case IDM_DOCUMENTS: iconIndex = -21; break; - case IDM_SETTINGS: iconIndex = -22; break; + // Smaller "24x24" icons used for the start menu + // The bitmaps are still 32x32, but the image is centered + case IDM_FAVORITES: iconIndex = -322; break; + case IDM_SEARCH: iconIndex = -323; break; + case IDM_HELPANDSUPPORT: iconIndex = -324; break; + case IDM_LOGOFF: iconIndex = -325; break; + case IDM_PROGRAMS: iconIndex = -326; break; + case IDM_DOCUMENTS: iconIndex = -327; break; + case IDM_RUN: iconIndex = -328; break; + case IDM_SHUTDOWN: iconIndex = -329; break; + case IDM_SETTINGS: iconIndex = -330; break; + case IDM_CONTROLPANEL: iconIndex = -22; break; - //case IDM_SECURITY: iconIndex = -21; break; case IDM_NETWORKCONNECTIONS: iconIndex = -257; break; case IDM_PRINTERSANDFAXES: iconIndex = -138; break; case IDM_TASKBARANDSTARTMENU: iconIndex = -40; break; - case IDM_SEARCH: iconIndex = -23; break; - case IDM_HELPANDSUPPORT: iconIndex = -24; break; - case IDM_RUN: iconIndex = -25; break; + //case IDM_SECURITY: iconIndex = -21; break; //case IDM_SYNCHRONIZE: iconIndex = -21; break; - case IDM_LOGOFF: iconIndex = -45; break; //case IDM_DISCONNECT: iconIndex = -21; break; //case IDM_UNDOCKCOMPUTER: iconIndex = -21; break; - case IDM_SHUTDOWN: iconIndex = -28; break; default: return S_FALSE; } if (iconIndex) { + if ((psminfo->dwMask & SMIM_TYPE) != 0) + psminfo->dwType = SMIT_STRING; if ((psminfo->dwMask & SMIM_ICON) != 0) psminfo->iIcon = Shell_GetCachedImageIndex(L"shell32.dll", iconIndex, FALSE); + if ((psminfo->dwMask & SMIM_FLAGS) != 0) + psminfo->dwFlags |= SMIF_ICON; #ifdef TEST_TRACKPOPUPMENU_SUBMENUS if ((psminfo->dwMask & SMIM_FLAGS) != 0) psminfo->dwFlags |= SMIF_TRACKPOPUP; #endif } + else + { + if ((psminfo->dwMask & SMIM_TYPE) != 0) + psminfo->dwType = SMIT_SEPARATOR; + } return S_OK; } @@ -266,7 +278,7 @@ public: }; extern "C" -HRESULT +HRESULT WINAPI CStartMenu_Constructor(REFIID riid, void **ppv) { IShellMenu* pShellMenu;