Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - <b>beginpaint()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
BeginPaint()
Start handling the WM_PAINT message
------------------------------------------------------------------------------

Syntax
#include "paint.ch"
BeginPaint( <hWnd>, <aPaint> )   -->   hDC

Arguments
<hWnd> specifies the window.

<aPaint> is an array of length PS_LENGTH (defined in paint.ch)
to hold the values returned by BeginPaint().

Returns
A handle to a device context is returned.

Description
This function can be used to assist in handling the WM_PAINT
message in the manner traditional with Windows applications
(i.e. in a window procedure).

Example
#include "paint.ch"

function MyWndProc( hWnd, nMsg, nwParam, nlParam )
local     aPaint[PS_LENGTH], hDC
do case
case nMsg == WM_PAINT
     hDC := BeginPaint( hWnd, aPaint )
     // .
     // .  (do output, using hDC)
     // .
     EndPaint( hWnd, aPaint )
otherwise
     return DefWindowProc( hWnd, nMsg, nwParam, nlParam )
endcase
return 0

A number of samples show this, including DRAW.PRG and ODRAW.PRG.

See Also: EndPaint()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson