### IPaintConnectionTo

  The IPaintConnectionTo class is a template class, derived from IPaintHandler, that processes paint events. This class allows you to process paint events in objects that do not derive from IPaintHandler without having to manually derive from IPaintHandler, override the paintWindow function, and pass the event to the object.

  To use the IPaintConnectionTo class to process paint events, follow these steps:

  1. instantiate the IPaintConnectionTo template with a class containing a member function whose signature and behavior are the same as IPaintHandler::paintWindow.
  2. Construct an object of the new template class by passing the object and the address of the function handling the paint events.
  3. Attach the template paint handler by using IHandler::handleEventsFor to pass the appropriate window to the paint handler.

  You use an IPaintConnectionTo object anywhere you use an IPaintHandler object. See the class description of IPaintHandler for a description of the uses and limitations of these classes.

### IPaintConnectionTo - Member Functions and Data by Group

### Constructors & Destructor

You can construct and destruct objects of this class. You cannot copy or assign objects of this class.

~IPaintConnectionTo

      public:
      virtual ~IPaintConnectionTo()

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

IPaintConnectionTo

      public:
      IPaintConnectionTo( ATarget& target,
                          MemberFunction memberFunction )

  Constructs the IMouseConnectionTo object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Event Processing

These members are overridden to route paint events to the target object that you provided on construction.

paintWindow

      protected:
      virtual bool paintWindow(IPaintEvent& event)

  Overridden to route paint events to the member function of the Target object provided on construction.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### IPaintConnectionTo - Type Definitions

MemberFunction

      typedef bool (ATarget::*MemberFunction)(IPaintEvent&)

  A pointer to a member function of Class ATarget that takes a reference to an IPaintEvent and returns a boolean.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### IPaintConnectionTo - Inherited Member Functions and Data

#### Inherited Public Functions

  IHandler

  -     virtual ~IHandler()

  -     virtual IString asDebugInfo() const

  -     virtual IString asString() const

  -     virtual IHandler& disable()

  -     virtual IHandler& enable(bool enable = true)

  -     virtual IHandler& handleEventsFor(IWindow* window)

  -     IHandler()

  -     bool isEnabled() const

  -     virtual IHandler& stopHandlingEventsFor(IWindow* window)

  IPaintHandler

  -     virtual ~IPaintHandler()

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  IHandler

  -     virtual IEventResult defaultProcedure(IEvent& event)

  -     virtual bool dispatchHandlerEvent(IEvent& event) = 0

  IPaintHandler

  -     virtual bool dispatchHandlerEvent(IEvent& event)

  -     IPaintHandler()

  -     virtual bool paintWindow(IPaintEvent& event) = 0

#### Inherited Protected Data

  - None