home *** CD-ROM | disk | FTP | other *** search
/ NEXT Generation 27 / NEXT27.iso / pc / demos / emperor / dx3.exe / SDK / SAMPLES / IKLOWNS / CGRES.CPP < prev    next >
C/C++ Source or Header  |  1996-08-28  |  1KB  |  53 lines

  1. /*===========================================================================*\
  2. |
  3. |  File:         cgres.cpp
  4. |
  5. |  Description: 
  6. |       Class implemetation for handling string resources
  7. |       
  8. |-----------------------------------------------------------------------------
  9. |
  10. |  Copyright (C) 1995-1996 Microsoft Corporation.  All Rights Reserved.
  11. |
  12. |  Written by Moss Bay Engineering, Inc. under contract to Microsoft Corporation
  13. |
  14. \*===========================================================================*/
  15.  
  16. #include "cgexcpt.h"
  17. #include "cgres.h"
  18.  
  19. /*---------------------------------------------------------------------------*\
  20. |
  21. |       Class CGameStringResource
  22. |
  23. |  DESCRIPTION:
  24. |       
  25. |
  26. |
  27. \*---------------------------------------------------------------------------*/
  28.  
  29. CGameStringResource::CGameStringResource(
  30.     HINSTANCE hInst,    // as passed to LoadString
  31.     UINT resId          // ID of the string
  32.     )
  33. {
  34.     mString[0] = '\0';
  35.     if (!LoadString(
  36.                 hInst,
  37.                 resId,
  38.                 mString,
  39.                 MAX_STRING_LENGTH
  40.                 )
  41.         )
  42.     {
  43.         // nasty business! we may be in an exception already, so be careful
  44.         throw CGameResourceError();
  45.     }
  46.  
  47. }   
  48.  
  49. CGameStringResource::~CGameStringResource()
  50. {
  51.     
  52. }   
  53.