1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<title>Windows Interface Reference: Painting structure</title> 6</head> 7 8<body> 9 10<h1>Painting and Drawing</h1> 11 12<p>The Painting structure contains functions to control painting and drawing to a window 13or device context.</p> 14 15<pre>structure Painting : 16 sig 17 type HWND and HDC and COLORREF and HRGN 18 19 type RECT = { top: int, left: int, bottom: int, right: int } 20 21 type BinaryRasterOperation 22 val R2_BLACK : BinaryRasterOperation 23 val R2_COPYPEN : BinaryRasterOperation 24 val R2_MASKNOTPEN : BinaryRasterOperation 25 val R2_MASKPEN : BinaryRasterOperation 26 val R2_MASKPENNOT : BinaryRasterOperation 27 val R2_MERGENOTPEN : BinaryRasterOperation 28 val R2_MERGEPEN : BinaryRasterOperation 29 val R2_MERGEPENNOT : BinaryRasterOperation 30 val R2_NOP : BinaryRasterOperation 31 val R2_NOT : BinaryRasterOperation 32 val R2_NOTCOPYPEN : BinaryRasterOperation 33 val R2_NOTMASKPEN : BinaryRasterOperation 34 val R2_NOTMERGEPEN : BinaryRasterOperation 35 val R2_NOTXORPEN : BinaryRasterOperation 36 val R2_WHITE : BinaryRasterOperation 37 val R2_XORPEN : BinaryRasterOperation 38 39 type PAINTSTRUCT = 40 { hdc: HDC, erase: bool, paint: RECT, private: Word8Vector.vector } 41 42 val <a 43name="BeginPaint">BeginPaint</a> : HWND -> HDC * PAINTSTRUCT 44 val <a name="EndPaint">EndPaint</a> : HWND * PAINTSTRUCT -> unit 45 val GdiFlush : unit -> unit 46 val GdiGetBatchLimit : unit -> int 47 val GdiSetBatchLimit : int -> int 48 val GetBkColor : HDC -> COLORREF 49 val GetROP2 : HDC -> BinaryRasterOperation 50 val GetUpdateRect : HWND * bool -> RECT option 51 val GetUpdateRgn : HWND * HRGN * bool -> Region.ResultRegion 52 val GetWindowDC : HWND -> HDC 53 val InvalidateRgn : HWND * HRGN * bool -> unit 54 val SetBkColor : HDC * COLORREF -> COLORREF 55 val SetROP2 : HDC * BinaryRasterOperation -> BinaryRasterOperation 56 val WindowFromDC : HDC -> HWND 57 end</pre> 58</body> 59</html> 60