### IPaintHandler

  The IPaintHandler class processes paint events for any window or control that requires the window or control to update its appearance on the screen.

  Create a handler derived from IPaintHandler and attach it to a window or control. You can do this by calling IHandler::handleEventsFor to pass the window or control to the paint handler.

  When the paint handler receives a paint event, it creates an IPaintEvent object and routes that object to the IPaintHandler::paintWindow virtual function. Override this virtual function to supply your own specialized processing of a paint event.

  The return value from the virtual function specifies whether the paint event is passed on for additional processing, as follows:

  true
    The paint event requires no additional processing. Do not pass it to another handler.
  false
    Pass the paint event to the next handler for additional processing, as follows:
    - If there is another handler for the control or window, pass the paint event to the next handler.
    - If this is the last handler for the control or window, call IWindow::defaultProcedure to process the paint event.

#### AIX Considerations

  Objects of the IPaintEvent class represent a Motif expose event.

### IPaintHandler - Member Functions and Data by Group

### Constructors & Destructor

Only derived classes can construct objects of this class.

~IPaintHandler

      public:
      virtual ~IPaintHandler()

Supported Platforms

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

IPaintHandler

      protected:
      IPaintHandler()

  Derived classes call this default constructor to create objects of this class.

Supported Platforms

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

### Event Dispatching

The Open Class Library dispatches events that have been sent or posted to a window to the handlers attached to that window. It does this by calling the event-dispatching function of the handler objects. An IPaintHandler object processes only window paint events.

dispatchHandlerEvent

      protected:
      virtual bool dispatchHandlerEvent(IEvent& event)

  If a paint event is received, this function calls the appropriate virtual function.

Supported Platforms

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

### Event Processing

A resize handler contains event-processing members that you use to process a window paint event. Override at least one of these virtual functions in a derived class.

paintWindow

      protected:
      virtual bool paintWindow(IPaintEvent& event) = 0

  Implemented by derived classes to handle a paint event. A derived class must supply this function.

  You should make all window updates using the presentation space handle returned by IPaintEvent::presSpaceHandle.

Supported Platforms

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

### IPaintHandler - 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)

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  IHandler

  -     virtual IEventResult defaultProcedure(IEvent& event)

  -     virtual bool dispatchHandlerEvent(IEvent& event) = 0

#### Inherited Protected Data

  - None