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
Download Visual Studio Add-In

Search Results for "GetWindowLong" in [All]

user32

.
Summary
.

On this platform this function is in fact a macro that calls GetWindowLong, so the EntryPoint property has to be set to the real function:

.

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

.

static extern IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex);

.

<DllImport("user32.dll", EntryPoint:="GetWindowLong")> _

.

Private Shared Function GetWindowLongPtr(ByVal hWnd As HandleRef, <MarshalAs(UnmanagedType.I4)>nIndex As WindowLongFlags) As IntPtr

.

Public Declare Function GetWindowLong Lib "user32.dll" Alias "GetWindowLongA" _

.

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

.

private static extern IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex);

.

<DllImport("user32.dll", EntryPoint:="GetWindowLongPtr")> _

.

Private Shared Function GetWindowLongPtr(ByVal hWnd As HandleRef, <MarshalAs(UnmanagedType.I4)>nIndex As WindowLongFlags) As IntPtr

.

Public Declare Function GetWindowLong Lib "user32.dll" Alias "GetWindowLongA" _

.

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

.

private static extern IntPtr GetWindowLongPtr32(IntPtr hWnd, int nIndex);

.

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

.

private static extern IntPtr GetWindowLongPtr64(IntPtr hWnd, int nIndex);

.

// GetWindowLongPtr directly

.

public static IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex)

.

     return GetWindowLongPtr64(hWnd, nIndex);

.

     return GetWindowLongPtr32(hWnd, nIndex);

.

<DllImport("user32.dll", EntryPoint:="GetWindowLong")> _

.

Private Shared Function GetWindowLongPtr32(ByVal hWnd As HandleRef, ByVal nIndex As Integer) As IntPtr

.

<DllImport("user32.dll", EntryPoint:="GetWindowLongPtr")> _

.

Private Shared Function GetWindowLongPtr64(ByVal hWnd As HandleRef, ByVal nIndex As Integer) As IntPtr

.

' This static method is required because Win32 does not support GetWindowLongPtr dirctly

.

Public Shared Function GetWindowLongPtr(ByVal hWnd As HandleRef, ByVal nIndex As Integer) As IntPtr

.

      Return GetWindowLongPtr64(hWnd, nIndex)

.

      Return GetWindowLongPtr32(hWnd, nIndex)

.

     result = GetWindowLongPtr(winhandle, GWL.GWL_ID);

.
Documentation
[GetWindowLongPtr] on MSDN
.
Summary
.

On this platform this function is in fact a macro that calls GetWindowLong, so the EntryPoint property has to be set to the real function:

.

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

.

static extern IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex);

.

<DllImport("user32.dll", EntryPoint:="GetWindowLong")> _

.

Private Shared Function GetWindowLongPtr(ByVal hWnd As HandleRef, <MarshalAs(UnmanagedType.I4)>nIndex As GWL) As IntPtr

.

Public Declare Function GetWindowLong Lib "user32.dll" Alias "GetWindowLongA" _

.

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

.

private static extern IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex);

.

<DllImport("user32.dll", EntryPoint:="GetWindowLongPtr")> _

.

Private Shared Function GetWindowLongPtr(ByVal hWnd As HandleRef, <MarshalAs(UnmanagedType.I4)>nIndex As GWL) As IntPtr

.

Public Declare Function GetWindowLong Lib "user32.dll" Alias "GetWindowLongA" _

.

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

.

private static extern IntPtr GetWindowLongPtr32(IntPtr hWnd, int nIndex);

.

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

.

private static extern IntPtr GetWindowLongPtr64(IntPtr hWnd, int nIndex);

.

// GetWindowLongPtr directly

.

public static IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex)

.

     return GetWindowLongPtr64(hWnd, nIndex);

.

     return GetWindowLongPtr32(hWnd, nIndex);

.

<DllImport("user32.dll", EntryPoint:="GetWindowLong")> _

.

Private Shared Function GetWindowLongPtr32(ByVal hWnd As HandleRef, ByVal nIndex As Integer) As IntPtr

.

<DllImport("user32.dll", EntryPoint:="GetWindowLongPtr")> _

.

Private Shared Function GetWindowLongPtr64(ByVal hWnd As HandleRef, ByVal nIndex As Integer) As IntPtr

.

' This static method is required because Win32 does not support GetWindowLongPtr dirctly

.

Public Shared Function GetWindowLongPtr(ByVal hWnd As HandleRef, ByVal nIndex As Integer) As IntPtr

.

      Return GetWindowLongPtr64(hWnd, nIndex)

.

      Return GetWindowLongPtr32(hWnd, nIndex)

.

     result = GetWindowLongPtr(winhandle, GWL.GWL_ID);

.
Documentation
[GetWindowLongPtr] on MSDN
.

        SetWindowLong(Handle, GWL_EXSTYLE, GetWindowLong(Handle, GWL_EXSTYLE) ^ WS_EX_LAYERED);

.

  ll_Ret = GetWindowLong(ll_handle, GWL_EXSTYLE)

.

// to the correct function (GetWindowLong in 32-bit mode and GetWindowLongPtr in 64-bit mode)

Constants

coredll

.
Summary
This function retrieves information about the specified window. GetWindowLong also retrieves the 32-bit value at the specified offset into the extra window memory of a window.
.

static extern System.UInt32 GetWindowLong(IntPtr  hWnd, int nIndex);

.

static extern IntPtr GetWindowLong(IntPtr window, int index);

.

    Private Shared Function GetWindowLong(ByVal hWnd As IntPtr, ByVal nIndex As Integer) As System.UInt32

.
Documentation
[GetWindowLong] on MSDN
.
Summary
.

private static extern int GetWindowLong(IntPtr hWnd, int nIndex);

.

Private Shared Function GetWindowLong(ByVal hWnd As IntPtr, ByVal nIndex As Integer) As Integer

.

        style = GetWindowLong(hWnd, GWL_STYLE);

.

    Private Function GetWindowLong(ByVal hWnd As IntPtr, ByVal nIndex As Integer) As Integer

.

    style = GetWindowLong(hWnd, GWL_STYLE)

Enums

.
Summary

 
Access PInvoke.net directly from VS: