C# Класс Win32.MyWin32

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

ColorToWin32() публичный статический Метод

public static ColorToWin32 ( PixelFarm c ) : int
c PixelFarm
Результат int

CreateFontHelper() публичный статический Метод

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
Результат System.IntPtr

CreateMemoryHdc() публичный статический Метод

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
Результат System.IntPtr

GetClassName() публичный статический Метод

public static GetClassName ( IntPtr handle ) : string
handle System.IntPtr
Результат string

GetWinTitle() публичный статический Метод

public static GetWinTitle ( IntPtr handle ) : string
handle System.IntPtr
Результат string

MAKELONG() публичный статический Метод

public static MAKELONG ( int low, int high ) : int
low int
high int
Результат int

ReleaseMemoryHdc() публичный статический Метод

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
Результат void

SetFontName() публичный статический Метод

public static SetFontName ( Win32.LOGFONT &logFont, string fontName ) : void
logFont Win32.LOGFONT
fontName string
Результат void

SignedHIWORD() публичный статический Метод

public static SignedHIWORD ( int n ) : int
n int
Результат int

SignedLOWORD() публичный статический Метод

public static SignedLOWORD ( int n ) : int
n int
Результат int