Windows NT 4.0 source code leak
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.

40 lines
1.1 KiB

4 years ago
  1. /***************************************************************************/
  2. /** Microsoft Windows **/
  3. /** Copyright(c) Microsoft Corp., 1993 **/
  4. /***************************************************************************/
  5. /****************************************************************************
  6. RESSTR.H
  7. Aug, 93 JimH
  8. ResString automatically allocates a buffer and loads in a
  9. resource string. This version of resstr does not handle
  10. variable-length parameters.
  11. Note: ResString objects can be cast to (const char *) and
  12. so can be directly used in ::MessageBox, etc.
  13. ****************************************************************************/
  14. #ifndef _RESSTR_H_
  15. #define _RESSTR_H_
  16. const int RS_SIZE = 80;
  17. class ResString {
  18. public:
  19. ResString(HINSTANCE hInst, int nID)
  20. { LoadString(hInst, nID, _pString, RS_SIZE); }
  21. operator const char * () const
  22. { return (const char *) _pString; }
  23. private:
  24. char _pString[RS_SIZE];
  25. };
  26. #endif // _RESSTR_H_