home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
OS2
/
MEMSZ230.ZIP
/
RESTRING.H
< prev
next >
Wrap
Text File
|
1993-12-08
|
1KB
|
50 lines
// Class RESTRING: Encapsulates the load/discard
// logic for a resource String Table entry.
#define INCL_BASE
#include <os2.h>
class ResourceString
{
private:
HMODULE SavedModule ;
ULONG SavedId ;
PVOID BlockPointer ;
PSZ StringPointer ;
public:
// Constructor
ResourceString ( HMODULE Module, ULONG Id ) ;
// Copy Constructor
ResourceString ( const ResourceString & Object )
{
SavedModule = Object.SavedModule ;
SavedId = Object.SavedId ;
BlockPointer = Object.BlockPointer ;
StringPointer = Object.StringPointer ;
}
// Typecast Operators
operator PSZ ()
{
return ( StringPointer ) ;
}
operator PCHAR ()
{
return ( PCHAR(StringPointer) ) ;
}
// Assignment Operator
ResourceString & operator= ( const ResourceString & Object )
{
SavedModule = Object.SavedModule ;
SavedId = Object.SavedId ;
BlockPointer = Object.BlockPointer ;
StringPointer = Object.StringPointer ;
return ( *this ) ;
}
} ;