Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy

Search Results for "POINT" in [All]

msvcrt

.
  • "a+" - Open a file for reading and appending. All writing operations are performed at the end of the file, protecting the previous content to be overwritten. You can reposition (fseek, rewind) the internal pointer to anywhere in the file for reading, but writing operations will move it back to the end of file. The file is created if it does not exist.
.

[DllImport("msvcrt.dll", EntryPoint = "memcpy", CallingConvention = CallingConvention.Cdecl, SetLastError = false)]

.

    <DllImport("msvcrt.dll", EntryPoint:="memcpy", CallingConvention:=CallingConvention.Cdecl)> _

.

System.Buffer.BlockCopy, Marshal.Copy and Array.Copy provide similar services, but require one or two managed arrays instead of pointers.

.

[DllImport("msvcrt.dll", EntryPoint = "memset", CallingConvention = CallingConvention.Cdecl, SetLastError = false)]

.

<DllImport("msvcrt.dll", EntryPoint := "memset", CallingConvention := CallingConvention.Cdecl, SetLastError := False)> _

.

dest - Pointer to destination.

.
Summary
The srand function sets the starting point for generating a series of pseudorandom integers. To reinitialize the generator, use 1 as the seed argument. Any other value for seed sets the generator to a random starting point. rand retrieves the pseudorandom numbers that are generated. Calling rand before any call to srand generates the same sequence as calling srand with seed passed as 1.

gdi32

.

When the function succeeds, the caller of this function can free the memory pointed to by pbFont because the system has made its own copy of the memory. To remove the fonts that were installed, call RemoveFontMemResourceEx. However, when the process goes away, the system will unload the fonts even if the process did not call RemoveFontMemResourceEx.

.

[DllImport("gdi32.dll", EntryPoint="GdiAlphaBlend")]

.

[DllImport("gdi32.dll", EntryPoint = "GdiAlphaBlend")]

.

[DllImport("gdi32.dll", EntryPoint = "BitBlt", SetLastError = true)]

.

[DllImport("gdi32.dll", EntryPoint = "CopyEnhMetaFile", SetLastError = true, CharSet = CharSet.Auto)]

.

[DllImport("gdi32.dll", EntryPoint = "CreateCompatibleBitmap")]

.

[DllImport("gdi32.dll", EntryPoint = "CreateCompatibleDC", SetLastError=true)]

.

    [DllImport("gdi32.dll", EntryPoint = "CreateDC", CharSet = CharSet.Auto, SetLastError = true)]

.
Summary
The CreateDIBSection function creates a Device Independent Bitmap (DIB) that applications can write to directly. The function gives you a pointer to the location of the bitmap bit values. You can supply a handle to a file-mapping object that the function will use to create the bitmap, or you can let the system allocate the memory for the bitmap.
.

If the function succeeds, the return value is a handle to the newly created device-independent bitmap (and ppvBits will point to the bitmap’s bit values). If the function fails, the return value is NULL (and ptr ppvBits will be NULL). To get extended error information, call GetLastError.

.

[DllImport("gdi32", EntryPoint="CreateFontW")]

.

Dont forget to call DeleteObject to free the pointer to the font (otherwise you get a nasty gdi leak)

.

in Pointer to a null-terminated character string that specifies the name of the device driver (for example, Epson).

.

in Pointer to a null-terminated character string that specifies the name of the specific output device being used, as shown by the Print Manager (for example, Epson FX-80). It is not the printer model name. The lpszDevice parameter must be used.

.

in Pointer to a DEVMODE structure containing device-specific initialization data for the device driver. The DocumentProperties function retrieves this structure filled in for a specified device. The lpdvmInit parameter must be NULL if the device driver is to use the default initialization (if any) specified by the user.

.

// create a bitmap and get a pointer suitable for GDI

.

void PaintLine3(IntPtr hbitmap, Point start, Point end, bool erase)

.

static extern IntPtr CreatePolygonRgn(POINT [] lppt, int cPoints,

.

POINT

.

System.Drawing.Point can be used instead POINT.

.

static extern IntPtr CreatePolygonRgn(Point[] lppt, int cPoints, int fnPolyFillMode);

.

    Private Shared Function CreatePolygonRgn(ByVal lppt As Point(), ByVal NumberOfPoints As Integer, ByVal fnPolyFillMode As Integer) As IntPtr

.

static extern IntPtr CreatePolyPolygonRgn(POINT [] lppt, int [] lpPolyCounts,

.

POINT

.

        [DllImport("user32.dll",EntryPoint="GetDC")]

.

    <DllImport("Gdi32.dll", EntryPoint:="CreateRoundRectRgn")>

.

        [DllImport("user32.dll",EntryPoint="GetDC")]

.

[DllImport("gdi32.dll", EntryPoint = "DeleteDC")]

.

[DllImport("gdi32.dll", EntryPoint = "DeleteObject")]

23: DPtoLP
.

static extern bool DPtoLP(IntPtr hdc, [In, Out] POINT [] lpPoints, int nCount);

.

POINT

.

POINT [] points = { new POINT(rect.Left, rect.Top), new POINT(rect.Right, rect.Bottom) };

.

bool ret = DPtoLP(m_hdc, points, 2);

.

        //If anyone knows of a better way to get the pointer please let me know

.

        //If anyone knows of a better way to get the pointer please let me know

.

[DllImport("gdi32.dll", EntryPoint = "ExtTextOutW")]

.

        [DllImport("user32.dll",EntryPoint="GetDC")]

.

static extern bool GetBrushOrgEx(IntPtr hdc, out POINT lppt);

.

POINT

.

/// <param name="iFirstChar">Specifies the code point of the first character in the group of consecutive

.

/// <param name="iLastChar">Specifies the code point of the last character in the group of consecutive

.

/// <param name="lpABCF">Pointer to an array of ABCFLOAT structures that receives the character widths,

.

/// function retrieves widths for any font. The widths returned by this function are in the IEEE floating-point

.

    [DllImport("gdi32.dll", EntryPoint="GetCharacterPlacementW")]

.

static extern bool GetCurrentPositionEx(IntPtr hdc, out POINT lpPoint);

.

POINT

.

/// <param name="lpvBits">A pointer to a buffer to receive the bitmap data. If this parameter is <see cref="IntPtr.Zero"/>, the function passes the dimensions and format of the bitmap to the <see cref="BITMAPINFO"/> structure pointed to by the <paramref name="lpbi"/> parameter.</param>

.

/// <param name="lpbi">A pointer to a <see cref="BITMAPINFO"/> structure that specifies the desired format for the DIB data.</param>

.

[DllImport("gdi32.dll", EntryPoint = "GetDIBits")]

.
  • lpvBuffer: Points to a byte array to receive the font information. If this parameter is NULL, the function returns the size of the buffer required for the font data.
.

    /// <param name="lpvBuffer">Points to a lpvBuffer to receive the font information. If this parameter is NULL, the function returns the size of the <paramref name="lpvBuffer"/> required for the font data.</param>

.

    [MarshalAs(UnmanagedType.Struct)] public POINTFX pfxStart;

.

    public struct POINT

.

    public struct POINTFX

.

    [MarshalAs(UnmanagedType.Struct)] public POINT gmptGlyphOrigin;

.

                            int pointFxSize = Marshal.SizeOf(typeof(POINTFX));

.

                                    POINTFX[] curvePoints = new POINTFX[curveHeader.cpfx];

.

                                        curvePoints[i] = (POINTFX)Marshal.PtrToStructure(new IntPtr(buffer.ToInt32()+index), typeof(POINTFX));

.

                                        index+=pointFxSize;

.

                                            short x = curvePoints[i].x.value;

.

                                            short y = (short)-curvePoints[i].y.value;

.

    // ...do something with line points...

.

                                            POINTFX pfxB = curvePoints[i];

.

                                            POINTFX pfxC = curvePoints[i+1];

.

                                            } // ...do something with curve points...

.

static extern int GetPath(IntPtr hdc, [Out] POINT [] lpPoints,

.

POINT

.

      // Since pointers are used, this whole routine is 'unsafe'

.

      // [RBS] Added missing second pointer identifier

.
Summary
.

[DllImport("gdi32.dll",EntryPoint="GetTextExtentExPointW")]

.

static extern bool GetTextExtentExPoint(IntPtr hdc, [MarshalAs(UnmanagedType.LPWStr)] string lpszStr,

.
Documentation
[GetTextExtentExPoint] on MSDN
.
Summary
.

static extern bool GetTextExtentPoint32(IntPtr hdc, string lpString,

.

static extern bool GetTextExtentPoint32(IntPtr hdc, string lpString, int cbString, out SIZE lpSize);

.

    GDI.GetTextExtentPoint32(hdc, text, text.Length,out sz);

.
Documentation
[GetTextExtentPoint32] on MSDN
.
Summary
.

static extern bool GetTextExtentPoint32(IntPtr hdc, string lpString,

.

static extern bool GetTextExtentPoint32(IntPtr hdc, string lpString,

.

    GDI.GetTextExtentPoint32(hdc, text, text.Length,out sz);

.
Documentation
[GetTextExtentPoint32] on MSDN
.

static extern bool GetViewportOrgEx(IntPtr hdc, out POINT lpPoint);

.

POINT

.

static extern bool GetWindowOrgEx(IntPtr hdc, out POINT lpPoint);

.

POINT

.

[DllImport("gdi32.dll", EntryPoint ="gluErrorString")]

.

[DllImport("gdi32.dll", EntryPoint = "GdiGradientFill", ExactSpelling = true)]

.

[DllImport("gdi32.dll", EntryPoint = "GdiGradientFill", ExactSpelling = true)]

.

[DllImport("gdi32.dll", EntryPoint = "GdiGradientFill", ExactSpelling = true)]

.

The GDI32.dll does not contain a GradientFill() function. The actual entry point is GdiGradientFill(). That's why the 'EntryPoint' attribute is present.

.

[DllImport("gdi32.dll", EntryPoint="DrawEscape")]

.

<System.Runtime.InteropServices.DllImportAttribute("gdi32.dll", EntryPoint:="DrawEscape")>  _

45: LineTo
.

// create a bitmap and get a pointer suitable for GDI

.

void PaintLine3(IntPtr hbitmap, Point start, Point end, bool erase)

46: LPtoDP
.

static extern bool LPtoDP(IntPtr hdc, [In, Out] POINT [] lpPoints, int nCount);

.

POINT

.

static extern bool MoveToEx(IntPtr hdc, int X, int Y, IntPtr lpPoint);

.

// create a bitmap and get a pointer suitable for GDI

.

void PaintLine3(IntPtr hbitmap, Point start, Point end, bool erase)

48: MWT_
.

      ///   specified, the XFORM structure pointed to by lpXform is ignored.

.

static extern bool OffsetViewportOrgEx(IntPtr hdc, int nXOffset, int nYOffset, out POINT lpPoint);

.

POINT

.

   IntPtr lpPoint);

51: PlgBlt
.

static extern bool PlgBlt(IntPtr hdcDest, POINT [] lpPoint, IntPtr hdcSrc,

.

POINT

.

static extern bool PolyBezierTo(IntPtr hdc, POINT [] lppt, uint cCount);

.

POINT

.

static extern bool PolyDraw(IntPtr hdc, POINT [] lppt, byte [] lpbTypes,

.

POINT

.

static extern bool Polygon(IntPtr hdc, POINT [] lpPoints, int nCount);

.

    ByRef lpPoint As Object, _

.

        PostSynchro.Win32.POINTAPI[] TrianglePoints = {new POINT(XStart+5,0),

.

         new POINT(0, SignalHeight / 2),new POINT(XStart + 5, SignalHeight)};

.

        PostSynchro.Win32.Polygon(Hdc, TrianglePoints, 3);

.

static extern bool PolylineTo(IntPtr hdc, POINT [] lppt, uint cCount);

.

POINT

.

static extern bool PolyPolygon(IntPtr hdc, POINT [] lpPoints,

.

POINT

.

static extern bool PolyPolyline(IntPtr hdc, POINT [] lppt,

.

   uint [] lpdwPolyPoints, uint cCount);

.

POINT

.

    public static extern bool RoundRect(RECT lpRect, Point point);

.

[DllImport("gdi32.dll", EntryPoint = "SelectObject")]

.

    static extern bool SetViewportOrgEx(IntPtr hDC, int x, int y, Point[] prevPoint);

.

    static extern bool SetWindowOrgEx(IntPtr hDC, int x, int y, Point[] prevPoint);

.

    public static extern int MoveToEx(IntPtr hDC, int x, int y, int nPreviousPoint);

.

    public static extern bool DPtoLP(IntPtr hdc, [In, Out] Point[] lpPoints, int nCount);

.

Point[] point = new Point[1];

.

         point);

.

           point);

Cut off search results after 60. Please refine your search.


 
Access PInvoke.net directly from VS: