class_docstr: A Windows bitmap with the given mode and size.  The mode can be one of "1",
  "L", "P", or "RGB".
  
  If the display requires a palette, this constructor creates a suitable
  palette and associates it with the image. For an "L" image, 128 greylevels
  are allocated. For an "RGB" image, a 6x6x6 colour cube is used, together
  with 20 greylevels.
  
  To make sure that palettes work properly under Windows, you must call the
  **palette** method upon certain events from Windows.
  
  :param image: Either a PIL image, or a mode string. If a mode string is
                used, a size must also be given.  The mode can be one of "1",
                "L", "P", or "RGB".
  :param size: If the first argument is a mode string, this
               defines the size of the image.
docstr: Copy the bitmap contents to a device context.
  
  :param handle: Device context (HDC), cast to a Python integer, or an
                 HDC or HWND instance.  In PythonWin, you can use the
                 :py:meth:`CDC.GetHandleAttrib` to get a suitable handle.
docstr_tok: ["Copy","the","bitmap","contents","to","a","device","context",".",":","param","handle",":","Device","context","(","HDC",")",",","cast","to","a","Python","integer",",","or","an","HDC","or","HWND","instance",".","In","PythonWin",",","you","can","use","the",":","py",":","meth",":","`","CDC.GetHandleAttrib","`","to","get","a","suitable","handle","."]
code: def expose(self, handle):
      """
      Copy the bitmap contents to a device context.
  
      :param handle: Device context (HDC), cast to a Python integer, or an
                     HDC or HWND instance.  In PythonWin, you can use the
                     :py:meth:`CDC.GetHandleAttrib` to get a suitable handle.
      """
      if isinstance(handle, HWND):
          dc = self.image.getdc(handle)
          try:
              result = self.image.expose(dc)
          finally:
              self.image.releasedc(handle, dc)
      else:
          result = self.image.expose(handle)
      return result
  
imports: from .None import Image
label_desc: Use image node_id 2 for calling the Dib obj's underlying member method code with example usage: obj.expose(handle) and returns: result