OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
owl::TXGdi Class Reference

Describes an exception resulting from GDI failures such as creating too many TWindow device contexts (DCs). More...

#include <owl/gdibase.h>

Inheritance diagram for owl::TXGdi:
owl::TXOwl owl::TXBase

Public Member Functions

 TXGdi (uint resId=IDS_GDIFAILURE, HANDLE handle=0)
 Constructs a TXGdi object with a default IDS_GDIFAILURE message.
 
TXGdiClone ()
 
void Throw ()
 Throws the exception object.
 
- Public Member Functions inherited from owl::TXOwl
 TXOwl (const tstring &msg, uint resId=0)
 An OWL exception with a given message for displaying and an unsigned Id that can be used for identification or loading a string.
 
 TXOwl (uint resId, TModule *module=&GetGlobalModule())
 An OWL exception with a given unsigned Id that can is used for loading a message string & identification.
 
virtual ~TXOwl ()
 Destroys a TXOwl object.
 
TXOwlClone ()
 
void Throw ()
 Throws the exception object.
 
virtual int Unhandled (TModule *appModule, uint promptResId)
 Per-exception class unhandled-handler, will default to the per-module unhandled-handler.
 
uint GetErrorCode () const
 Returns the resource ID.
 
- Public Member Functions inherited from owl::TXBase
 TXBase (const tstring &msg)
 Calls the xmsg class's constructor that takes a string parameter and initializes xmsg with the value of the string parameter.
 
 TXBase (const TXBase &src)
 Creates a copy of the TXBase object passed in the TXBase parameter.
 
virtual ~TXBase ()
 
const charwhat () const noexcept
 
TXBase &_RTLENTRY operator= (const TXBase &src)
 
tstring why () const
 

Static Public Member Functions

static tstring Msg (uint resId, HANDLE)
 Converts the resource ID to a string and returns the string message.
 
static void Raise (uint resId=IDS_GDIFAILURE, HANDLE handle=0)
 Throws the exception.
 
- Static Public Member Functions inherited from owl::TXOwl
static tstring ResourceIdToString (bool *found, uint resId, TModule *module=&GetGlobalModule())
 Static member function used to convert a resource id to a 'string'.
 
static tstring MakeMessage (uint resId, const tstring &infoStr, TModule *module=&GetGlobalModule())
 
static tstring MakeMessage (uint resId, LPCTSTR infoStr, TModule *module=&GetGlobalModule())
 Extension to string loader adds the feature of sprintf'ing an additional information string into the resource message string.
 
static tstring MakeMessage (uint resId, uint infoNum, TModule *module=&GetGlobalModule())
 This extension to the string loader adds the feature of sprintf'ing an additional information string into the resource message string.
 
static void Raise (const tstring &msg, uint resId=0)
 
static void Raise (uint resId, TModule *module=&GetGlobalModule())
 
- Static Public Member Functions inherited from owl::TXBase
static void Raise (const tstring &msg)
 Constructs a TXBase exception from scratch, and throws it.
 

Additional Inherited Members

- Public Attributes inherited from owl::TXOwl
uint ResId
 Resource ID for a TXOwl object.
 
- Protected Attributes inherited from owl::TXBase
std::string str
 

Detailed Description

Describes an exception resulting from GDI failures such as creating too many TWindow device contexts (DCs).

This exception occurs, for example, if a DC driver cannot be located or if a device-independent bitmap (DIB) file cannot be read.

The following code from the PAINT.CPP sample program on BC5.0x distribution disk throws a TXGdi exception if a new DIB cannot be created.

void TCanvas::NewDib(int width, int height, int nColors)
{
try {
dib = new TDib(width, height, nColors);
}
catch (TXGdi& x) {
MessageBox("Could Not Create DIB", GetApplication()->Name, MB_OK);
return;
}
Pseudo-GDI object Device Independent Bitmap (DIB) class.
Definition gdiobjec.h:795
Describes an exception resulting from GDI failures such as creating too many TWindow device contexts ...
Definition gdibase.h:52

Definition at line 52 of file gdibase.h.

Constructor & Destructor Documentation

◆ TXGdi()

owl::TXGdi::TXGdi ( uint resId = IDS_GDIFAILURE,
HANDLE handle = 0 )

Constructs a TXGdi object with a default IDS_GDIFAILURE message.

Definition at line 82 of file gdibase.cpp.

Member Function Documentation

◆ Clone()

TXGdi * owl::TXGdi::Clone ( )
virtual

Reimplemented from owl::TXBase.

Definition at line 92 of file gdibase.cpp.

References TXGdi().

◆ Msg()

tstring owl::TXGdi::Msg ( uint resId,
HANDLE handle )
static

Converts the resource ID to a string and returns the string message.

Note
For backward compatibility

Definition at line 74 of file gdibase.cpp.

References owl::TXOwl::MakeMessage().

◆ Raise()

void owl::TXGdi::Raise ( uint resId = IDS_GDIFAILURE,
HANDLE handle = 0 )
static

Throws the exception.

Definition at line 112 of file gdibase.cpp.

References TXGdi().

◆ Throw()

void owl::TXGdi::Throw ( )
virtual

Throws the exception object.

Throw must be implemented in any class derived from TXOwl.

Reimplemented from owl::TXBase.

Definition at line 103 of file gdibase.cpp.


The documentation for this class was generated from the following files: