Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1017 B

  1. #ifndef _MENUUTIL_H_
  2. #define _MENUUTIL_H_
  3. const int MENUPOS_CALL = 0;
  4. const int MENUPOS_VIEW = 1;
  5. const int MENUPOS_TOOLS = 2;
  6. const int MENUPOS_HELP = 3;
  7. const int MENUPOS_TOOLS_VIDEO = 0;
  8. // Owner Draw Info:
  9. struct MYOWNERDRAWSTRUCT
  10. {
  11. HICON hIcon;
  12. HICON hIconSel;
  13. int iImage;
  14. PVOID pvObj;
  15. BOOL fCanCheck;
  16. BOOL fChecked;
  17. LPTSTR pszText;
  18. };
  19. typedef MYOWNERDRAWSTRUCT* PMYOWNERDRAWSTRUCT;
  20. const int MENUICONSIZE = 16;
  21. const int MENUICONGAP = 3;
  22. const int MENUICONSPACE = 3;
  23. const int MENUTEXTOFFSET = MENUICONSIZE + (2 * MENUICONSPACE) + MENUICONGAP;
  24. const int MENUSELTEXTOFFSET = MENUICONSIZE + (2 * MENUICONSPACE) + 1;
  25. struct TOOLSMENUSTRUCT
  26. {
  27. MYOWNERDRAWSTRUCT mods;
  28. UINT uID;
  29. TCHAR szExeName[MAX_PATH];
  30. TCHAR szDisplayName[MAX_PATH];
  31. };
  32. UINT FillInTools( HMENU hMenu,
  33. UINT uIDOffset,
  34. LPCTSTR pcszRegKey,
  35. CSimpleArray<TOOLSMENUSTRUCT*>& rToolsList);
  36. UINT CleanTools(HMENU hMenu,
  37. CSimpleArray<TOOLSMENUSTRUCT*>& rToolsList);
  38. #endif // _MENUUTIL_H_