Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than user32, prefix the name with the module name and a period.
ReleaseDC (user32)
.
C# Signature:
/// <summary>Releases a device context (DC), freeing it for use by other applications.</summary>
/// <remarks><para>The effect of the ReleaseDC function depends on the type of DC. It
/// frees only common and window DCs. It has no effect on class or private DCs.</para>
/// <para>The application must call the ReleaseDC function for each call to the
/// GetWindowDC function and for each call to the GetDC function that retrieves a
/// common DC. </para><para>An application cannot use the ReleaseDC function to release
/// a DC that was created by calling the CreateDC function; instead, it must use the
/// DeleteDC function. ReleaseDC must be called from the same thread that called
/// GetDC.</para></remarks>
/// <param name="hWnd">Handle to the window whose DC is to be released.</param>
/// <param name="hDC">Handle to the DC to be released.</param>
/// <returns>The return value indicates whether the DC was released. If the DC was
/// released, the return value is 1. If the DC was not released, the return value is
/// zero.</returns>
[DllImport("user32.dll")]
static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC);
VB Signature:
Declare Function ReleaseDC Lib "user32.dll" _
(hWnd As IntPtr, hDC As IntPtr) As Integer
Notes:
The application must call the ReleaseDC function for each call to the GetWindowDC function and for each call to the GetDC function that retrieves a common DC.
An application cannot use the ReleaseDC function to release a DC that was created by calling the CreateDC function; instead, it must use the DeleteDC function. ReleaseDC must be called from the same thread that called GetDC.
Tips & Tricks:
Using managed DC functions for API's that require the DC work almost just as well as the API DC functions themselves.
8-5-06 Update by Gabriel T. Sharp (osirisgothra@hotmail.com)
Creates a device context for a device using the specified name.
10/27/2016 8:27:49 AM - -202.74.138.1
The DeleteDC function deletes the specified device context (DC).
7/18/2014 6:45:54 PM - Seri-109.90.29.109
The TextOut API
4/21/2013 6:44:24 AM - -81.217.152.144
The GetTextExtentPoint32 API
3/3/2011 4:42:48 AM - -129.188.33.26
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).