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.

62 lines
1.3 KiB

  1. // StResource.h -- String Resource helper routines
  2. // (c) Copyright Schlumberger Technology Corp., unpublished work, created
  3. // 1998. This computer program includes Confidential, Proprietary
  4. // Information and is a Trade Secret of Schlumberger Technology Corp. All
  5. // use, disclosure, and/or reproduction is prohibited unless authorized
  6. // in writing. All Rights Reserved.
  7. #if !defined(SLBCSP_STRESOURCE_H)
  8. #define SLBCSP_STRESOURCE_H
  9. #if defined(_UNICODE)
  10. #if !defined(UNICODE)
  11. #define UNICODE
  12. #endif //!UNICODE
  13. #endif //_UNICODE
  14. #if defined(UNICODE)
  15. #if !defined(_UNICODE)
  16. #define _UNICODE
  17. #endif //!_UNICODE
  18. #endif //UNICODE
  19. #include <string>
  20. #include <windef.h>
  21. #include <slbRcCsp.h>
  22. class StringResource
  23. {
  24. public:
  25. StringResource(UINT uID);
  26. const std::string
  27. AsString() const;
  28. const CString
  29. AsCString() const;
  30. static const std::string
  31. AsciiFromUnicode(LPCTSTR szSource);
  32. static const std::string
  33. CheckAsciiFromUnicode(LPCTSTR szSource);
  34. static bool
  35. IsASCII(LPCTSTR szSource);
  36. static const CString
  37. UnicodeFromAscii(std::string const &rsSource);
  38. private:
  39. std::string m_s;
  40. CString m_cs;
  41. };
  42. extern HANDLE
  43. GetImageResource(DWORD dwId,
  44. DWORD dwType);
  45. #endif // SLBCSP_STRESOURCE_H