C# Class Win32.MyWin32

ファイルを表示 Open project: prepare/HTML-Renderer Class Usage Examples

Public Methods

Method Description
ColorToWin32 ( PixelFarm c ) : int
CreateFontHelper ( string fontName, float emHeight, bool bold, bool italic, float pixels_per_inch = 96 ) : IntPtr
CreateMemoryHdc ( IntPtr hdc, int width, int height, IntPtr &dib, IntPtr &ppvBits ) : IntPtr

Create a compatible memory HDC from the given HDC.
The memory HDC can be rendered into without effecting the original HDC.
The returned memory HDC and dib must be released using ReleaseMemoryHdc.

GetClassName ( IntPtr handle ) : string
GetWinTitle ( IntPtr handle ) : string
MAKELONG ( int low, int high ) : int
ReleaseMemoryHdc ( IntPtr memoryHdc, IntPtr dib ) : void

Release the given memory HDC and dib section created from CreateMemoryHdc.

SetFontName ( Win32.LOGFONT &logFont, string fontName ) : void
SignedHIWORD ( int n ) : int
SignedLOWORD ( int n ) : int

Private Methods

Method Description
AlphaBlend ( IntPtr hdc, int nXOriginDest, int nYOriginDest, int nWidthDest, int nHeightDest, IntPtr hdcSrc, int nXOriginSrc, int nYOriginSrc, int nWidthSrc, int nHeightSrc, _BLENDFUNCTION &blendFunction ) : bool
BitBlt ( IntPtr hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, IntPtr hdcSrc, int nXSrc, int nYSource, int dwRop ) : bool
ConvEmSizeInPointsToPixels ( float emsizeInPoint, float pixels_per_inch ) : float
CreateCompatibleBitmap ( IntPtr hdc, int nWidth, int nHeight ) : IntPtr
CreateCompatibleDC ( IntPtr hdc ) : IntPtr
CreateDC ( string szdriver, string szdevice, string szoutput, IntPtr devmode ) : IntPtr
CreateDIBSection ( IntPtr hdc, [ pbmi, uint iUsage, IntPtr &ppvBits, IntPtr hSection, uint dwOffset ) : IntPtr
CreateDIBitmap ( IntPtr hdc, IntPtr lpBitmapInfo, int fdwInt, IntPtr lpbInit, IntPtr BitmapInfo, uint fuUsage ) : IntPtr
CreateFontIndirect ( Win32.LOGFONT &logFont ) : IntPtr
CreatePen ( int fnPenStyle, int nWidth, int crColor ) : IntPtr
CreateRectRgn ( int left, int top, int right, int bottom ) : IntPtr
CreateSolidBrush ( int crColor ) : IntPtr
DeleteDC ( IntPtr hdc ) : bool
DeleteObject ( IntPtr obj ) : bool
FillRect ( IntPtr hdc, Win32Rect &rect, IntPtr hBrush ) : int
FillRgn ( IntPtr hdc, IntPtr hRgn, IntPtr hBrush ) : bool
FindWindow ( string lpClassName, string lpWindowName ) : IntPtr
FindWindowEx ( IntPtr hwndParent, IntPtr hwndChildAfter, string className, string windowName ) : IntPtr
FlashWindow ( IntPtr hwnd, bool bInvert ) : bool
FrameRect ( IntPtr hDC, MyWin32 &rect, IntPtr hBrush ) : bool
GetActiveWindow ( ) : IntPtr
GetCharABCWidths ( IntPtr hdc, uint uFirstChar, uint uLastChar, [ lpabc ) : bool
GetCharABCWidthsFloat ( IntPtr hdc, uint uFirstChar, uint uLastChar, [ lpabc ) : bool
GetCharWidth32 ( IntPtr hdc, uint uFirstChar, uint uLastChar, int &width ) : bool
GetClassName ( IntPtr hWnd, StringBuilder className, int maxCount ) : int
GetDC ( IntPtr hWnd ) : IntPtr
GetDCBrushColor ( IntPtr hdc ) : int
GetDCPenColor ( IntPtr hdc ) : int
GetDeviceCaps ( IntPtr hDC, int nIndex ) : int
GetForegroundWindow ( ) : IntPtr
GetLastError ( ) : int
GetMessagePos ( ) : int
GetMessageTime ( ) : int
GetObject ( IntPtr hgdiobj, int cbBuffer, void lpvObject ) : int
GetParent ( IntPtr hWnd ) : IntPtr
GetRgnBox ( IntPtr hrgn, Win32Rect &lprc ) : int
GetStockObject ( int index ) : IntPtr
GetTextAlign ( IntPtr hdc ) : uint
GetTextExtentPoint32 ( IntPtr hdc, string lpstring, int c, WIN32SIZE &size ) : bool
GetTopWindow ( IntPtr hWnd ) : IntPtr
GetViewportOrgEx ( IntPtr hdc, MyWin32 p ) : bool
GetWindow ( IntPtr hWnd, int wCmd ) : IntPtr
GetWindowText ( IntPtr hWnd, StringBuilder winText, int maxCount ) : int
GetWindowTextLength ( IntPtr hWnd ) : int
GetWindowThreadProcessId ( IntPtr hwnd, object dwProcessId ) : int
GlobalAlloc ( int flags, int size ) : IntPtr
GlobalFree ( IntPtr handle ) : IntPtr
GlobalLock ( IntPtr handle ) : IntPtr
GlobalUnlock ( IntPtr handle ) : bool
LineTo ( IntPtr hdc, int nXEnd, int nYEnd ) : int
LoadKeyboardLayout ( string pwszKLID, int flags ) : int
MoveToEx ( IntPtr hdc, int X, int Y, int lpPoint ) : bool
OffsetRgn ( IntPtr hdc, int xoffset, int yoffset ) : int
OffsetViewportOrgEx ( IntPtr hdc, int nXOffset, int nYOffset, IntPtr &lpPoint ) : bool
PatBlt ( IntPtr hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, int dwRop ) : bool
PostMessage ( IntPtr hWnd, int msg, int wParam, int lParam ) : bool
Rectangle ( IntPtr hDC, int l, int t, int r, int b ) : bool
ReleaseDC ( IntPtr hWnd, IntPtr hDc ) : int
RestoreDC ( IntPtr hdc, int nSaveDC ) : bool
RoundRect ( IntPtr hdc, int nLeftRect, int nTopRect, int nRightRect, int nButtomRect, int nWidth, int nHeight ) : bool
SaveDC ( IntPtr hdc ) : int
SelectClipRgn ( IntPtr hdc, IntPtr hrgn ) : int
SelectObject ( IntPtr hDc, IntPtr obj ) : IntPtr
SendMessage ( IntPtr hWnd, int msg, int wParam, int lParam ) : int
SetBkMode ( IntPtr hdc, int mode ) : int
SetDCBrushColor ( IntPtr hdc, int crColor ) : int
SetDCPenColor ( IntPtr hdc, int crColor ) : int
SetDIBits ( IntPtr hdc, IntPtr hBitmap, uint uStartScan, uint cScanLines, IntPtr lpbitmapArray, IntPtr lpBitmapData, uint fuColorUse ) : int
SetDIBitsToDevice ( IntPtr hdc, int xdst, int ydst, int width, int height, int xsrc, int ysrc, int start, int lines, IntPtr bitsptr, IntPtr bmiptr, int color ) : int
SetRectRgn ( IntPtr hrgn, int left, int top, int right, int bottom ) : bool
SetTextAlign ( IntPtr hdc, uint fMode ) : uint
SetTextColor ( IntPtr hdc, int newcolorRef ) : int
SetViewportOrgEx ( IntPtr hdc, int x, int y, IntPtr expoint ) : bool
SetWindowPos ( IntPtr hWnd, int hWndInsertAfter, int x, int y, int cx, int cy, int flags ) : bool
SetWindowText ( IntPtr hWnd, string text ) : int
ShowCaret ( IntPtr hWnd ) : void
WindowFromPoint ( POINT point ) : IntPtr

Method Details

ColorToWin32() public static method

public static ColorToWin32 ( PixelFarm c ) : int
c PixelFarm
return int

CreateFontHelper() public static method

public static CreateFontHelper ( string fontName, float emHeight, bool bold, bool italic, float pixels_per_inch = 96 ) : IntPtr
fontName string
emHeight float
bold bool
italic bool
pixels_per_inch float
return System.IntPtr

CreateMemoryHdc() public static method

Create a compatible memory HDC from the given HDC.
The memory HDC can be rendered into without effecting the original HDC.
The returned memory HDC and dib must be released using ReleaseMemoryHdc.
public static CreateMemoryHdc ( IntPtr hdc, int width, int height, IntPtr &dib, IntPtr &ppvBits ) : IntPtr
hdc System.IntPtr the HDC to create memory HDC from
width int the width of the memory HDC to create
height int the height of the memory HDC to create
dib System.IntPtr returns used bitmap memory section that must be released when done with memory HDC
ppvBits System.IntPtr
return System.IntPtr

GetClassName() public static method

public static GetClassName ( IntPtr handle ) : string
handle System.IntPtr
return string

GetWinTitle() public static method

public static GetWinTitle ( IntPtr handle ) : string
handle System.IntPtr
return string

MAKELONG() public static method

public static MAKELONG ( int low, int high ) : int
low int
high int
return int

ReleaseMemoryHdc() public static method

Release the given memory HDC and dib section created from CreateMemoryHdc.
public static ReleaseMemoryHdc ( IntPtr memoryHdc, IntPtr dib ) : void
memoryHdc System.IntPtr Memory HDC to release
dib System.IntPtr bitmap section to release
return void

SetFontName() public static method

public static SetFontName ( Win32.LOGFONT &logFont, string fontName ) : void
logFont Win32.LOGFONT
fontName string
return void

SignedHIWORD() public static method

public static SignedHIWORD ( int n ) : int
n int
return int

SignedLOWORD() public static method

public static SignedLOWORD ( int n ) : int
n int
return int