⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gdi.odl

📁 The code for this article was written for version 1.0 of the Active Template Library (ATL). The cu
💻 ODL
📖 第 1 页 / 共 5 页
字号:

    BOOL    WINAPI QueryAbort([in] HDC hdc, int);

    */

    // ******* GDI Escape support *******

    /*
    int     WINAPI Escape([in] HDC hdc, int, int, LPCSTR, void FAR *);

    */

    // ******* Path support *******

    #if WIN32
    [
    usesgetlasterror,
    entry("AbortPath"),
    helpstring("Closes and discards any paths in the specified device context"),
    ]
    BOOL WINAPI AbortPath([in] HDC hDC);

    [
    usesgetlasterror,
    entry("ArcTo"),
    helpstring("Draws an elliptical arc"),
    ]
    BOOL WINAPI ArcTo([in] HDC hDC,
                      [in] int nLeftRect, [in] int nTopRect,
                      [in] int nRightRect, [in] int nBottomRect,
                      [in] int nXRadial1, [in] int nYRadial1,
                      [in] int nXRadial2, [in] int nYRadial2);

    [
    usesgetlasterror,
    entry("BeginPath"),
    helpstring("Opens a path bracket in the specified device context"),
    ]
    BOOL WINAPI BeginPath([in] HDC hDC);

    [
    usesgetlasterror,
    entry("CloseFigure"),
    helpstring("Closes an open figure in a path"),
    ]
    BOOL WINAPI CloseFigure([in] HDC hDC);

    [
    usesgetlasterror,
    entry("EndPath"),
    helpstring("Closes a path bracket and selects the path into the specified device context"),
    ]
    BOOL WINAPI EndPath([in] HDC hDC);

    [
    usesgetlasterror,
    entry("FillPath"),
    helpstring("Closes any open figures in the current path and fills the path's interior using the current brush and polygon-filling modes"),
    ]
    BOOL WINAPI FillPath([in] HDC hDC);

    [
    usesgetlasterror,
    entry("FlattenPath"),
    helpstring("Transforms curves in the current path, turning each into a sequence of lines"),
    ]
    BOOL WINAPI FlattenPath([in] HDC hDC);

    [
    usesgetlasterror,
    entry("GetPath"),
    helpstring("Retrieves the coordinates defining the endpoints of lines and the control points of curves found in the current path"),
    ]
    int WINAPI GetPath([in] HDC hDC, [in, out] int * lpPoints,
                       [in, out] BYTE * lpTypes, [in] int nSize);

    [
    usesgetlasterror,
    entry("PathToRegion"),
    helpstring("Creates a region from the current path"),
    ]
    HRGN WINAPI PathToRegion([in] HDC hDC);

    [
    usesgetlasterror,
    entry("PolyDraw"),
    helpstring("Draws a set of line segments and Bezier curves"),
    ]
    BOOL WINAPI PolyDraw([in] HDC hDC, [in] int * lppt,
                         [in] BYTE * lpbTypes, [in] int cCount);

    [
    usesgetlasterror,
    entry("SelectClipPath"),
    helpstring("Selects the current path as a clipping region, combining the new region with any existing clipping region by using the specified mode"),
    ]
    BOOL WINAPI SelectClipPath([in] HDC hDC, [in] int iMode);

    [
    usesgetlasterror,
    entry("SetArcDirection"),
    helpstring("Sets the drawing direction to be used for arc and rectangle functions to AD_COUNTERCLOCKWISE or AD_CLOCKWISE"),
    ]
    int WINAPI SetArcDirection([in] HDC hDC, [in] int ArcDirection);

    [
    usesgetlasterror,
    entry("SetMiterLimit"),
    helpstring("Sets the limit for the length of miter joins for the specified device context"),
    ]
    BOOL WINAPI SetMiterLimit([in] HDC hDC, [in] FLOAT eNewLimit,
                              [out] FLOAT * peOldLimit);

    [
    usesgetlasterror,
    entry("StrokeAndFillPath"),
    helpstring("Strokes the outline of the path with the current pen and fills with the current brush"),
    ]
    BOOL WINAPI StrokeAndFillPath([in] HDC hDC);

    [
    usesgetlasterror,
    entry("StrokePath"),
    helpstring("Strokes the outline of the path with the current pen"),
    ]
    BOOL WINAPI StrokePath([in] HDC hDC);

    [
    usesgetlasterror,
    entry("WidenPath"),
    helpstring("Redefines the current path as the area that would be painted if the path were stroked using the current pen"),
    ]
    BOOL WINAPI WidenPath([in] HDC hDC);

    [
    usesgetlasterror,
    entry("GetMiterLimit"),
    helpstring("Gets the limit for the length of miter joins for the specified device context"),
    ]
    BOOL WINAPI GetMiterLimit([in] HDC hDC, [out] FLOAT * peOldLimit);


    [
    usesgetlasterror,
    entry("GetArcDirection"),
    helpstring("Gets the drawing direction used for arc and rectangle functions (AD_COUNTERCLOCKWISE or AD_CLOCKWISE)"),
    ]
    int WINAPI GetArcDirection([in] HDC hDC);

    // HPEN WINAPI ExtCreatePen(DWORD, DWORD, CONST LOGBRUSH *, DWORD, CONST DWORD *);

    #endif // WIN32

}

[
uuid(54674045-3A82-101B-8181-00AA003743D3),
helpstring("Windows GDI Constants"),
,
dllname("NOSUCH.DLL")
]
module GDIConst {

    // new StretchBlt() Modes (simpler names)
    [ helpstring("SetStretchBltMode: AND compressed bits (preserve black) for SetStretchBltMode)") ]
    const int STRETCH_ANDSCANS   = 1;
    [ helpstring("SetStretchBltMode: OR compressed bits (preserve colored or white) for SetStretchBltMode") ]
    const int STRETCH_ORSCANS        = 2;
    [ helpstring("SetStretchBltMode: Delete compressed lines of bits for SetStretchBltMode") ]
    const int STRETCH_DELETESCANS    = 3;

    // Ternary raster operations
    [ helpstring("BitBlt: Copy source bits over destination bits") ]
    const DWORD SRCCOPY = 0x00CC0020;
    [ helpstring("BitBlt: OR source bits onto destination") ]
    const DWORD SRCPAINT    = 0x00EE0086;
    [ helpstring("BitBlt: AND source bits onto destination") ]
    const DWORD SRCAND      = 0x008800C6;
    [ helpstring("BitBlt: XOR source bits onto destination") ]
    const DWORD SRCINVERT   = 0x00660046;
    [ helpstring("BitBlt: Invert destination bits, AND the result with source bits") ]
    const DWORD SRCERASE    = 0x00440328;
    [ helpstring("BitBlt: Invert source bits, copy to destination") ]
    const DWORD NOTSRCCOPY  = 0x00330008;
    [ helpstring("BitBlt: OR source bits onto destination bits, invert result") ]
    const DWORD NOTSRCERASE = 0x001100A6;
    [ helpstring("BitBlt: AND source bits onto pattern bits, copy to destination") ]
    const DWORD MERGECOPY   = 0x00C000CA;
    [ helpstring("BitBlt: Invert source bits, AND result onto destination") ]
    const DWORD MERGEPAINT  = 0x00BB0226;
    [ helpstring("BitBlt: Copy pattern bits over destination bits") ]
    const DWORD PATCOPY = 0x00F00021;
    [ helpstring("BitBlt: Invert source bits, OR result with pattern, OR result with destination") ]
    const DWORD PATPAINT    = 0x00FB0A09;
    [ helpstring("BitBlt: XOR pattern bits onto destination") ]
    const DWORD PATINVERT   = 0x005A0049;
    [ helpstring("BitBlt: Invert destination bits") ]
    const DWORD DSTINVERT   = 0x00550009;
    [ helpstring("BitBlt: Turn destination bits black (0)") ]
    const DWORD BLACKNESS   = 0x00000042;
    [ helpstring("BitBlt: Turn destination bits white (1)") ]
    const DWORD WHITENESS   = 0x00FF0062;

    // ExtFloodFill style flags
    [ helpstring("ExtFloodFill: Fill to border specified by color") ]
    const int FLOODFILLBORDER   = 0;
    [ helpstring("ExtFloodFill: Fill with color, end of color is border") ]
    const int FLOODFILLSURFACE  = 1;

    // Device Parameters for GetDeviceCaps()
    [ helpstring("GetDeviceCaps: Version number") ]
    const int DRIVERVERSION = 0;
    [ helpstring("GetDeviceCaps: Device type returns DT_PLOTTER, DT_RASDISPLAY, DT_RASPRINTER, DT_RASCAMERA, DT_CHARSTREAM, DT_METAFILE, or DT_DISPFILE ") ]
    const int TECHNOLOGY    = 2;
    [ helpstring("GetDeviceCaps: Width of display in millimeters") ]
    const int HORZSIZE      = 4;
    [ helpstring("GetDeviceCaps: Height of display in millimeters") ]
    const int VERTSIZE      = 6;
    [ helpstring("GetDeviceCaps: Width of display in pixels") ]
    const int HORZRES       = 8;
    [ helpstring("GetDeviceCaps: Height of display in raster lines") ]
    const int VERTRES       = 10;
    [ helpstring("GetDeviceCaps: Color bits per pixel") ]
    const int BITSPIXEL     = 12;
    [ helpstring("GetDeviceCaps: Color planes") ]
    const int PLANES        = 14;
    [ helpstring("GetDeviceCaps: Number of device-specific brushes") ]
    const int NUMBRUSHES    = 16;
    [ helpstring("GetDeviceCaps: Number of device-specific pens") ]
    const int NUMPENS       = 18;
    [ helpstring("GetDeviceCaps: Number of device-specific markers") ]
    const int NUMMARKERS    = 20;
    [ helpstring("GetDeviceCaps: Number of device-specific fonts") ]
    const int NUMFONTS      = 22;
    [ helpstring("GetDeviceCaps: Entries in device color table") ]
    const int NUMCOLORS     = 24;
    [ helpstring("GetDeviceCaps: Size of PDEVICE structure in bytes") ]
    const int PDEVICESIZE   = 26;
    [ helpstring("GetDeviceCaps: Curve capability flags - CC_NONE, CC_CIRCLES, CC_PIE, CC_CHORD, CC_ELLIPSES, CC_WIDE, CC_STYLED, CC_WIDESTYLED, CC_INTERIORS, CC_ROUNDRECT") ]
    const int CURVECAPS     = 28;
    [ helpstring("GetDeviceCaps: Line capability flags - LC_NONE, LC_POLYLINE, LC_MARKER, LC_POLYMARKER, LC_WIDE, LC_STYLED, LC_WIDESTYLED, LC_INTERIORS") ]
    const int LINECAPS      = 30;
    [ helpstring("GetDeviceCaps: Polygon capability flags - PC_NONE, PC_POLYGON, PC_RECTANGLE, PC_WINDPOLYGON, PC_SCANLINE, PC_WIDE, PC_STYLED, PC_WIDESTYLED, PC_INTERIORS") ]
    const int POLYGONALCAPS = 32;
    [ helpstring(
    "GetDeviceCaps: Text capability flags - TC_OP_STROKE, TC_CR_90, TC_CR_ANY, TC_IA_ABLE, TC_UA_ABLE, TC_SO_ABLE, TC_RA_ABLE, TC_VA_ABLE, Etc.") ]
    const int TEXTCAPS    = 34;
    [ helpstring("GetDeviceCaps: Clipping capability flags - CP_NONE, CP_RECTANGLE, CP_REGION") ]
    const int CLIPCAPS      = 36;
    [ helpstring(
    "GetDeviceCaps: Raster capability flags - RC_BITBLT, RC_SCALING, RC_SAVEBITMAP, RC_DI_BITMAP, RC_PALETTE, RC_STRETCHBLT, RC_FLOODFILL, RC_STRETCHDIB, Etc."
    ) ]
    const int RASTERCAPS    = 38;
    [ helpstring("GetDeviceCaps: X Aspect") ]
    const int ASPECTX       = 40;
    [ helpstring("GetDeviceCaps: Y Aspect") ]
    const int ASPECTY       = 42;
    [ helpstring("GetDeviceCaps: X/Y Aspect") ]
    const int ASPECTXY      = 44;
    [ helpstring("GetDeviceCaps: X pixels per logical inch") ]
    const int LOGPIXELSX    = 88;
    [ helpstring("GetDeviceCaps: Y pixels per logical inch") ]
    const int LOGPIXELSY    = 90;
    [ helpstring("GetDeviceCaps: Entries in system palette") ]
    const int SIZEPALETTE   = 104;
    [ helpstring("GetDeviceCaps: Reserved entries in system palette") ]
    const int NUMRESERVED   = 106;
    [ helpstring("GetDeviceCaps: Color resolution in bits per pixel") ]
    const int COLORRES      = 108;

    // GetDeviceCaps() return value masks

    // TECHNOLOGY
    [ helpstring("GetDeviceCaps: TECHNOLOGY flag") ]
    const int DT_PLOTTER        = 0;
    [ helpstring("GetDeviceCaps: TECHNOLOGY flag") ]
    const int DT_RASDISPLAY     = 1;
    [ helpstring("GetDeviceCaps: TECHNOLOGY flag") ]
    const int DT_RASPRINTER     = 2;
    [ helpstring("GetDeviceCaps: TECHNOLOGY flag") ]
    const int DT_RASCAMERA      = 3;
    [ helpstring("GetDeviceCaps: TECHNOLOGY flag") ]
    const int DT_CHARSTREAM     = 4;
    [ helpstring("GetDeviceCaps: TECHNOLOGY flag") ]
    const int DT_METAFILE       = 5;
    [ helpstring("GetDeviceCaps: TECHNOLOGY flag") ]
    const int DT_DISPFILE       = 6;

    // CURVECAPS
    [ helpstring("GetDeviceCaps: CURVECAPS flag") ]
    const UINT CC_NONE          = 0x0000;
    [ helpstring("GetDeviceCaps: CURVECAPS flag") ]
    const UINT CC_CIRCLES       = 0x0001;
    [ helpstring("GetDeviceCaps: CURVECAPS flag") ]
    const UINT CC_PIE           = 0x0002;
    [ helpstring("GetDeviceCaps: CURVECAPS flag") ]
    const UINT CC_CHORD         = 0x0004;
    [ helpstring("GetDeviceCaps: CURVECAPS flag") ]
    const UINT CC_ELLIPSES      = 0x0008;
    [ helpstring("GetDeviceCaps: CURVECAPS flag") ]
    const UINT CC_WIDE          = 0x0010;
    [ helpstring("GetDeviceCaps: CURVECAPS flag") ]
    const UINT CC_STYLED            = 0x0020;
    [ helpstring("GetDeviceCaps: CURVECAPS flag") ]
    const UINT CC_WIDESTYLED        = 0x0040;
    [ helpstring("GetDeviceCaps: CURVECAPS flag") ]
    const UINT CC_INTERIORS     = 0x0080;
    [ helpstring("GetDeviceCaps: CURVECAPS flag") ]
    const UINT CC_ROUNDRECT     = 0x0100;

    // LINECAPS
    [ helpstring("GetDeviceCaps: LINECAPS flag") ]
    const UINT LC_NONE          = 0x0000;
    [ helpstring("GetDeviceCaps: LINECAPS flag") ]
    const UINT LC_POLYLINE      = 0x0002;
    [ helpstring("GetDeviceCaps: LINECAPS flag") ]
    const UINT LC_MARKER            = 0x0004;
    [ helpstring("GetDeviceCaps: LINECAPS flag") ]
    const UINT LC_POLYMARKER        = 0x0008;
    [ helpstring("GetDeviceCaps: LINECAPS flag") ]
    const UINT LC_WIDE          = 0x0010;
    [ helpstring("GetDeviceCaps: LINECAPS flag") ]
    const UINT LC_STYLED            = 0x0020;
    [ helpstring("GetDeviceCaps: LINECAPS flag") ]
    const UINT LC_WIDESTYLED        = 0x0040;
    [ helpstring("GetDeviceCaps: LINECAPS flag") ]
    const UINT LC_INTERIORS     = 0x0080;

    // POLYGONALCAPS
    [ helpstring("GetDeviceCaps: POLYCONALCAPS flag") ]
    const UINT PC_NONE          = 0x0000;
    [ helpstring("GetDeviceCaps: POLYCONALCAPS flag") ]
    const UINT PC_POLYGON       = 0x0001;
    [ helpstring("GetDeviceCaps: POLYCONALCAPS flag") ]
    const UINT PC_RECTANGLE     = 0x0002;
    [ helpstring("GetDeviceCaps: POLYCONALCAPS flag") ]
    const UINT PC_WINDPOLYGON   = 0x0004;
    [ helpstring("GetDeviceCaps: POLYCONALCAPS flag") ]
    const UINT PC_SCANLINE      = 0x0008;
    [ helpstring("GetDeviceCaps: POLYCONALCAPS flag") ]
    const UINT PC_WIDE          = 0x0010;
    [ helpstring("GetDeviceCaps: POLYCONALCAPS flag") ]
    const UINT PC_STYLED        = 0x0020;
    [ helpstring("GetDeviceCaps: POLYCONALCAPS flag") ]
    const UINT PC_WIDESTYLED    = 0x0040;
    [ helpstring("GetDeviceCaps: POLYCONALCAPS flag") ]
    const UINT PC_INTERIORS     = 0x0080;

    // TEXTCAPS
    [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
    const UINT TC_OP_CHARACTER  = 0x0001;
    [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
    const UINT TC_OP_STROKE     = 0x0002;
    [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
    const UINT TC_CP_STROKE     = 0x0004;
    [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
    const UINT TC_CR_90         = 0x0008;
    [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
    const UINT TC_CR_ANY        = 0x0010;
    [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
    const UINT TC_SF_X_YINDEP   = 0x0020;
    [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
    const UINT TC_SA_DOUBLE     = 0x0040;
    [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
    const UINT TC_SA_INTEGER    = 0x0080;
    [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
    const UINT TC_SA_CONTIN     = 0x0100;
    [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
    const UINT TC_EA_DOUBLE     = 0x0200;
    [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
    const UINT TC_IA_ABLE       = 0x0400;
    [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
    const UINT TC_UA_ABLE       = 0x0800;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -