Leaked source code of windows server 2003
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.

57 lines
1.7 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /**********************************************************************/
  5. /*
  6. bltidres.hxx
  7. Replacement for MAKEINTRESOURCE.
  8. FILE HISTORY
  9. KeithMo 24-Mar-1992 Split off from BLTDLG.HXX.
  10. */
  11. #ifndef _BLT_HXX_
  12. #error "Don't include this file directly; instead, include it through blt.hxx"
  13. #endif // _BLT_HXX_
  14. #ifndef _BLTIDRES_HXX_
  15. #define _BLTIDRES_HXX_
  16. /*************************************************************************
  17. NAME: IDRESOURCE (idrsrc)
  18. SYNOPSIS: Resource identifier
  19. INTERFACE: QueryPsz() - returns what the Win APIs want to see
  20. IsStringId()- returns TRUE if the ID isn't numeric.
  21. Non-numeric IDs don't work too well in
  22. a multi-client scenario. Hint. Hint.
  23. NOTES:
  24. This class replaces MAKEINTRESOURCE in the public interfaces.
  25. HISTORY:
  26. beng 01-Nov-1991 Created
  27. beng 31-Jul-1992 Added IsStringId
  28. **************************************************************************/
  29. DLL_CLASS IDRESOURCE // idrsrc
  30. {
  31. private:
  32. const TCHAR * _psz;
  33. public:
  34. IDRESOURCE( const TCHAR * pszResourceName ) : _psz(pszResourceName) {}
  35. IDRESOURCE( UINT idResource ) : _psz(MAKEINTRESOURCE(idResource)) {}
  36. const TCHAR * QueryPsz() const
  37. { return _psz; }
  38. BOOL IsStringId() const
  39. { return (HIWORD(PtrToUlong(_psz))) != 0; }
  40. };
  41. #endif // _BLTIDRES_HXX_ - end of file