by
0
6
1,519
0
Top 1% !
Popular
Famous
Easy-to-find
Specified
OpenSource
Popularity: 15565th place

Published on:

LanguageCSharp
LicenseMIT_X11
OSWindows

DeleteObject: The DeleteObject function deletes a logical pen, brush, font, bitmap, region, or palette, freeing all system resources associated with the object. After the object is deleted, the specified handle is no longer valid.

<summary>
The DeleteObject function deletes a logical pen, brush, font, bitmap, region, or palette, freeing all system resources associated with the object. After the object is deleted, the specified handle is no longer valid.
</summary>
<param name="hObject">A handle to a logical pen, brush, font, bitmap, region, or palette.</param>
<returns>If the function succeeds, the return value is nonzero. If the specified handle is not valid or is currently selected into a DC, the return value is zero.</returns>
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/292898/DeleteObject--The-DeleteObject-function-?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
using System; using System.Runtime.InteropServices; /// <summary> /// The DeleteObject function deletes a logical pen, brush, font, bitmap, region, or palette, freeing all system resources associated with the object. After the object is deleted, the specified handle is no longer valid. /// </summary> /// <param name="hObject">A handle to a logical pen, brush, font, bitmap, region, or palette.</param> /// <returns>If the function succeeds, the return value is nonzero. If the specified handle is not valid or is currently selected into a DC, the return value is zero.</returns> [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Interoperability", "CA1414:MarkBooleanPInvokeArgumentsWithMarshalAs", Justification = "Adding this attribute causes an error."), DllImport("gdi32.dll")] internal static extern bool DeleteObject(IntPtr hObject);
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus