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 "GetWindowDC" in [All]

gdi32

.

            dc2=GetWindowDC(c.Handle);

coredll

.

[DllImport("coredll.dll", EntryPoint="GetWindowDC", SetLastError=true)]

.

private static extern IntPtr GetWindowDCCE(IntPtr hWnd);

.

<DllImport("coredll.dll", EntryPoint:="GetWindowDC", CharSet:=CharSet.Auto, ExactSpelling:=True)> _

.

Private Shared Function GetWindowDC(ByVal hWnd As HandleRef) As IntPtr

.

Declare Function GetWindowDC Lib "coredll.dll" (ByVal hWnd As HandleRef) As IntPtr

.
Documentation
[GetWindowDC] on MSDN

user32

.

    Private Declare Auto Function GetWindowDC Lib "user32.dll" (ByVal windowHandle As IntPtr) As IntPtr

.

    Dim srcDeviceContext As IntPtr = GetWindowDC(windowHandle)

.
Summary
The GetWindowDC function retrieves the device context (DC) for the entire window, including title bar, menus, and scroll bars. A window device context permits painting anywhere in a window, because the origin of the device context is the upper-left corner of the window instead of the client area. GetWindowDC assigns default attributes to the window device context each time it retrieves the device context. Previous attributes are lost.
.

static extern IntPtr GetWindowDC(IntPtr hWnd);

.

Public Shared Function GetWindowDC(ByVal hWnd As IntPtr) As IntPtr

.

Declare Function GetWindowDC Lib "user32" (ByVal hWnd As Long) As Long

.

GetWindowDC is intended for special painting effects within a window's nonclient area. Painting in nonclient areas of any window is not recommended. The GetSystemMetrics function can be used to retrieve the dimensions of various parts of the nonclient area, such as the title bar, menu, and scroll bars. The GetDC function can be used to retrieve a device context for the entire screen.

.

  Declare Function GetWindowDC Lib "user32" (ByVal hwnd As IntPtr) As IntPtr

.

    Dim MyGrphHdc As IntPtr = GetWindowDC(Me.Handle)

.
Documentation
[GetWindowDC] on MSDN

 
Access PInvoke.net directly from VS: