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.

56 lines
1.9 KiB

  1. // global.h
  2. //
  3. #ifndef __GLOBAL_H__
  4. #define __GLOBAL_H__
  5. // hard-coded colors to be used instead of COLOR_BTNFACE, _BTNTEXT, etc.
  6. // - hese are for access via MyGetSysColor() - and GetSysBrush()
  7. #define CMP_COLOR_HILITE 25 // RGB(255, 255, 255)
  8. #define CMP_COLOR_LTGRAY 26 // RGB(192, 192, 192) - instead of BtnFace
  9. #define CMP_COLOR_DKGRAY 27 // RGB(128, 128, 128)
  10. #define CMP_COLOR_BLACK 28 // RGB(0, 0, 0) - instead of frame
  11. // - these are for when all you need is a RGB value)
  12. #define CMP_RGB_HILITE RGB(255, 255, 255)
  13. #define CMP_RGB_LTGRAY RGB(192, 192, 192) // instead of BtnFace
  14. #define CMP_RGB_DKGRAY RGB(128, 128, 128)
  15. #define CMP_RGB_BLACK RGB(0, 0, 0) // instead of frame
  16. #define HID_BASE_BUTTON 0x00070000UL // IDMB and IDMY
  17. extern CBrush* GetHalftoneBrush();
  18. extern CBrush* GetSysBrush(UINT nSysColor);
  19. extern void ResetSysBrushes();
  20. extern COLORREF MyGetSysColor(UINT nSysColor);
  21. // Remove the drive and directory from a file name...
  22. //
  23. CString StripPath(const TCHAR* szFilePath);
  24. // Remove the name part of a file path. Return just the drive and directory.
  25. //
  26. CString StripName(const TCHAR* szFilePath);
  27. // Remove the name part of a file path. Return just the drive and directory, and name.
  28. //
  29. CString StripExtension(const TCHAR* szFilePath);
  30. // Get only the extension of a file path.
  31. //
  32. CString GetExtension(const TCHAR* szFilePath);
  33. // Get the name of a file path.
  34. //
  35. CString GetName(const TCHAR* szFilePath);
  36. // Return the path to szFilePath relative to szDirectory. (E.g. if szFilePath
  37. // is "C:\FOO\BAR\CDR.CAR" and szDirectory is "C:\FOO", then "BAR\CDR.CAR"
  38. // is returned. This will never use '..'; if szFilePath is not in szDirectory
  39. // or a sub-directory, then szFilePath is returned unchanged.
  40. //
  41. CString GetRelativeName(const TCHAR* szFilePath, const TCHAR* szDirectory = NULL);
  42. void PreTerminateList( CObList* pList );
  43. #endif // __GLOBAL_H__