[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  BeginPaint( hWnd, @cPS )-> <hDC>
------------------------------------------------------------------------------


 PARAMETER:

  <hWnd>        Is the handle that identifies the window to be repainted

  <cPS>         Is a string variable passed by references that will receive
                a WinApi PAINTSTRUCT as a string


 RETURNS:

  <hDC> is the device context handle for the given window


 DESCRIPTION:


  BeginPaint() prepares the specified window for painting and fills a 
  PAINTSTRUCT structure with information about the painting. Think of
  BeginPaint() as of some kind of Clippers DispBegin() ..

  BeginPaint automatically sets the clipping region of the device context
  to exclude any area outside the update region. The update region is set
  by InvalidateRect() and by the system after sizing, moving, creating,
  scrolling or any other operation that affects the client area. If the
  update region is marked for erasing, BeginPaint sends a WM_ERASEBKGND
  message to the window.

  An application should not call BeginPaint() except in response to a
  WM_PAINT message. Each call to BeginPaint() must have a corresponding
  call EndPaint().

  If the caret is in the area to be painted, BeginPaint automatically hides
  the caret to prevent it from being erased. If the window's class has a
  background brush, BeginPaint will use that brush to erase the background
  of the update region before returning.


 SOURCE:

  SOURCE\WINAPI\PAINT.C



See Also: Endpaint Beginpaint PaintStruct hDC InvalidateRect
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson