gdi.odl
来自「The code for this article was written fo」· ODL 代码 · 共 1,864 行 · 第 1/5 页
ODL
1,864 行
BOOL WINAPI Rectangle([in] HDC hdc,
[in] int nLeft, [in] int nTop,
[in] int nRight, [in] int nBottom);
[
usesgetlasterror,
entry("RoundRect"),
helpstring("Draws rounded rectangle around given points with current pen and filled with current brush, using ellipse of (nWidth, nHeight) on corners"),
]
BOOL WINAPI RoundRect([in] HDC hdc,
[in] int nLeft, [in] int nTop,
[in] int nRight, [in] int nBottom,
[in] int nWidth, [in] int nHeight);
[
usesgetlasterror,
entry("Ellipse"),
helpstring("Draws ellipse bounded by given points with current pen and filled with current brush"),
]
BOOL WINAPI Ellipse([in] HDC hdc,
[in] int nLeft, [in] int nTop,
[in] int nRight, [in] int nBottom);
[
usesgetlasterror,
entry("Arc"),
helpstring("Draws an elliptical arc"),
]
BOOL WINAPI Arc([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("Chord"),
helpstring("Draws a chord (a region bounded by the intersection of an ellipse and a line segment, called a secant)"),
]
BOOL WINAPI Chord([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("Pie"),
helpstring("Draws a pie-shaped wedge bounded by the intersection of an ellipse and two radials"),
]
BOOL WINAPI Pie([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("Polygon"),
helpstring("Draws a polygon"),
]
BOOL WINAPI Polygon([in] HDC hdc, [in] int FAR * lppt,
[in] int cPoints);
// BOOL WINAPI PolyPolygon([in] HDC hdc, const POINT FAR *, int FAR *, int);
// int WINAPI SetPolyFillMode([in] HDC hdc, int);
// int WINAPI GetPolyFillMode([in] HDC hdc);
/* Omitted
typedef void (CALLBACK* LINEDDAPROC)(int, int, LPARAM);
void WINAPI LineDDA(int, int, int, int, LINEDDAPROC, LPARAM);
*/
[
usesgetlasterror,
entry("FloodFill"),
helpstring("Fill to the nearest clrref border with current brush starting at x,y"),
]
BOOL WINAPI FloodFill([in] HDC hdc,
[in] int nXStart, [in] int nYStart,
[in] COLORREF clrref);
[
usesgetlasterror,
entry("ExtFloodFill"),
helpstring("Fill to nearest clrref border with current brush starting at x,y with given fill type"),
]
BOOL WINAPI ExtFloodFill([in] HDC hdc,
[in] int nXStart, [in] int nYStart,
[in] COLORREF clrref,
[in] UINT fuFillType);
/*
BOOL WINAPI FillRgn([in] HDC hdc, HRGN, HBRUSH);
BOOL WINAPI FrameRgn([in] HDC hdc, HRGN, HBRUSH, int, int);
BOOL WINAPI InvertRgn([in] HDC hdc, HRGN);
BOOL WINAPI PaintRgn([in] HDC hdc, HRGN);
// Rectangle output routines
int WINAPI FillRect([in] HDC hdc, const RECT FAR *, HBRUSH);
int WINAPI FrameRect([in] HDC hdc, const RECT FAR *, HBRUSH);
void WINAPI InvertRect([in] HDC hdc, const RECT FAR *);
void WINAPI DrawFocusRect([in] HDC hdc, const RECT FAR *);
*/
// ****** Text support *********
/*
BOOL WINAPI TextOut([in] HDC hdc, int, int, LPCSTR, int);
LONG WINAPI TabbedTextOut([in] HDC hdc, int, int, LPCSTR, int, int, int FAR *, int);
BOOL WINAPI ExtTextOut([in] HDC hdc, int, int, UINT, const RECT FAR *, LPCSTR, UINT, int FAR *);
DWORD WINAPI GetTextExtent([in] HDC hdc, LPCSTR, int);
DWORD WINAPI GetTabbedTextExtent([in] HDC hdc, LPCSTR, int, int, int FAR *);
BOOL WINAPI GetTextExtentPoint([in] HDC hdc, LPCSTR, int, SIZE FAR *);
int WINAPI DrawText([in] HDC hdc, LPCSTR, int, RECT FAR *, UINT);
typedef BOOL (CALLBACK* GRAYSTRINGPROC)([in] HDC hdc, LPARAM, int);
BOOL WINAPI GrayString([in] HDC hdc, HBRUSH, GRAYSTRINGPROC, LPARAM, int, int, int, int, int);
BOOL WINAPI GetCharWidth([in] HDC hdc, UINT, UINT, int FAR *);
*/
[
usesgetlasterror,
entry("SetTextColor"),
helpstring("Sets the text (foreground) color of a DC"),
]
COLORREF WINAPI SetTextColor([in] HDC hdc, [in] COLORREF clrref);
[
usesgetlasterror,
entry("GetTextColor"),
helpstring("Gets the text (foreground) color of a DC"),
]
COLORREF WINAPI GetTextColor([in] HDC hdc);
[
usesgetlasterror,
entry("SetBkColor"),
helpstring("Set the background color of a DC"),
]
COLORREF WINAPI SetBkColor([in] HDC hdc, [in] COLORREF clrref);
[
usesgetlasterror,
entry("GetBkColor"),
helpstring("Get the background color of a DC"),
]
COLORREF WINAPI GetBkColor([in] HDC hdc);
[
usesgetlasterror,
entry("SetBkMode"),
helpstring("Set the background mode of a DC"),
]
int WINAPI SetBkMode([in] HDC hdc, [in] int fnBkMode);
[
usesgetlasterror,
entry("GetBkMode"),
helpstring("Get the background mode of a DC"),
]
int WINAPI GetBkMode([in] HDC hdc);
/*
UINT WINAPI SetTextAlign([in] HDC hdc, UINT);
UINT WINAPI GetTextAlign([in] HDC hdc);
int WINAPI SetTextCharacterExtra([in] HDC hdc, int);
int WINAPI GetTextCharacterExtra([in] HDC hdc);
int WINAPI SetTextJustification([in] HDC hdc, int, int);
*/
// ****** Omit Font support ******
// ****** Bitmap support ************
/*
typedef struct tagBITMAP
{
int bmType;
int bmWidth;
int bmHeight;
int bmWidthBytes;
BYTE bmPlanes;
BYTE bmBitsPixel;
void FAR * bmBits;
} BITMAP;
typedef BITMAP* PBITMAP;
typedef BITMAP NEAR * NPBITMAP;
typedef BITMAP FAR * LPBITMAP;
// Bitmap Header structures
typedef struct tagRGBTRIPLE
{
BYTE rgbtBlue;
BYTE rgbtGreen;
BYTE rgbtRed;
} RGBTRIPLE;
typedef RGBTRIPLE FAR * LPRGBTRIPLE;
typedef struct tagRGBQUAD
{
BYTE rgbBlue;
BYTE rgbGreen;
BYTE rgbRed;
BYTE rgbReserved;
} RGBQUAD;
typedef RGBQUAD FAR * LPRGBQUAD;
// structures for defining DIBs
typedef struct tagBITMAPCOREHEADER
{
DWORD bcSize;
short bcWidth;
short bcHeight;
WORD bcPlanes;
WORD bcBitCount;
} BITMAPCOREHEADER;
typedef BITMAPCOREHEADER* PBITMAPCOREHEADER;
typedef BITMAPCOREHEADER FAR * LPBITMAPCOREHEADER;
typedef struct tagBITMAPINFOHEADER
{
DWORD biSize;
LONG biWidth;
LONG biHeight;
WORD biPlanes;
WORD biBitCount;
DWORD biCompression;
DWORD biSizeImage;
LONG biXPelsPerMeter;
LONG biYPelsPerMeter;
DWORD biClrUsed;
DWORD biClrImportant;
} BITMAPINFOHEADER;
typedef BITMAPINFOHEADER* PBITMAPINFOHEADER;
typedef BITMAPINFOHEADER FAR * LPBITMAPINFOHEADER;
typedef struct tagBITMAPINFO
{
BITMAPINFOHEADER bmiHeader;
RGBQUAD bmiColors[1];
} BITMAPINFO;
typedef BITMAPINFO* PBITMAPINFO;
typedef BITMAPINFO FAR * LPBITMAPINFO;
typedef struct tagBITMAPCOREINFO
{
BITMAPCOREHEADER bmciHeader;
RGBTRIPLE bmciColors[1];
} BITMAPCOREINFO;
typedef BITMAPCOREINFO* PBITMAPCOREINFO;
typedef BITMAPCOREINFO FAR * LPBITMAPCOREINFO;
typedef struct tagBITMAPFILEHEADER
{
UINT bfType;
DWORD bfSize;
UINT bfReserved1;
UINT bfReserved2;
DWORD bfOffBits;
} BITMAPFILEHEADER;
typedef BITMAPFILEHEADER* PBITMAPFILEHEADER;
typedef BITMAPFILEHEADER FAR * LPBITMAPFILEHEADER;
HBITMAP WINAPI CreateBitmapIndirect(BITMAP FAR * );
HBITMAP WINAPI CreateDiscardableBitmap([in] HDC hdc, int, int);
HBITMAP WINAPI CreateDIBitmap([in] HDC hdc, BITMAPINFOHEADER FAR *, DWORD, const void FAR *, BITMAPINFO FAR *, UINT);
HBITMAP WINAPI LoadBitmap([in] HINSTANCE hInst, LPCSTR);
*/
[
usesgetlasterror,
entry("CreateCompatibleBitmap"),
helpstring("Creates a bitmap of the given size compatible with the given DC"),
]
HBITMAP WINAPI CreateCompatibleBitmap([in] HDC hdc,
[in] int nWidth,
[in] int nHeight);
[
usesgetlasterror,
entry("CreateBitmap"),
helpstring("Creates a device independent memory bitmap with the given width, height, and bit data"),
]
HBITMAP WINAPI CreateBitmap([in] int nWidth, [in] int nHeight,
[in] UINT cbPlanes, [in] UINT cbBits,
[in] DWORD lpvBits);
[
usesgetlasterror,
entry("BitBlt"),
helpstring("Combines source, destination, and pattern of two DCs according to ROP mode"),
]
BOOL WINAPI BitBlt([in] HDC hdcDest,
[in] int nXDest, [in] int nYDest,
[in] int nWidth, [in] int nHeight,
[in] HDC hdcSrc,
[in] int nXSrc, [in] int nYSrc,
[in] DWORD dwRop);
[
usesgetlasterror,
entry("PatBlt"),
helpstring("Combines select brush and destination pattern on DC according to ROP mode"),
]
BOOL WINAPI PatBlt([in] HDC hdc,
[in] int nLeftRect, [in] int nTopRect,
[in] int nWidth, [in] int nHeight,
[in] DWORD fdwRop);
[
usesgetlasterror,
entry("StretchBlt"),
helpstring("Combines select brush and destination pattern on DC according to ROP mode while changing size"),
]
BOOL WINAPI StretchBlt([in] HDC hdcDest,
[in] int nXOriginDest, [in] int nYOriginDest,
[in] int bWidthDest, [in] int nHeightDest,
[in] HDC hdcSrc,
[in] int nXOriginSrc, [in] int nYOriginSrc,
[in] int nWidthSrc, [in] int nHeightSrc,
[in] DWORD dwRop);
#ifdef WIN32
[
usesgetlasterror,
entry("PlgBlt"),
helpstring("Combines source, destination, and pattern of two DCs according to ROP mode"),
]
BOOL WINAPI PlgBlt([in] HDC hdcDest,
[in, out] WORD FAR * lpPoint,
[in] HDC hdcSrc,
[in] int nXSrc, [in] int nYSrc,
[in] int nWidth, [in] int nHeight,
[in] HBITMAP hbmMask,
[in] int sMask, [in] int yMask);
[
usesgetlasterror,
entry("MaskBlt"),
helpstring("Combines source and destination of two DCs with a monochrome bitmap mask according to combined foreground and background ROP modes"),
]
BOOL WINAPI MaskBlt([in] HDC hdcDest,
[in] int nXDest, [in] int nYDest,
[in] int nWidth, [in] int nHeight,
[in] HDC hdcSrc,
[in] int nXSrc, [in] int nYSrc,
[in] HBITMAP hbmMask,
[in] int xMask, [in] int yMask,
[in] DWORD dwRop);
#endif
/*
int WINAPI StretchDIBits([in] HDC hdc, int, int, int, int, int,
int, int, int, const void FAR *, LPBITMAPINFO, UINT, DWORD);
*/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?