Gdi32DeleteObject(HandleRef) Method
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.
Do not delete a drawing object (pen or brush) while it is still selected into a DC.
When a pattern brush is deleted, the bitmap associated with the brush is not deleted.
The bitmap must be deleted independently.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("GDI32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static bool DeleteObject(
HandleRef hObject
)
<DllImportAttribute("GDI32.dll", CharSet := CharSet.Auto, SetLastError := true>]
Public Shared Function DeleteObject (
hObject As HandleRef
) As Boolean
Dim hObject As HandleRef
Dim returnValue As Boolean
returnValue = Gdi32.DeleteObject(hObject)
public:
[DllImportAttribute(L"GDI32.dll", CharSet = CharSet::Auto, SetLastError = true)]
static bool DeleteObject(
HandleRef hObject
)
[<DllImportAttribute("GDI32.dll", CharSet = CharSet.Auto, SetLastError = true)>]
static member DeleteObject :
hObject : HandleRef -> bool
No code example is currently available or this language may not be supported.
- hObject HandleRef
-
A handle to a logical pen, brush, font, bitmap, region, or palette.
Boolean
If the function succeeds, the return value is
.
If the specified handle is not valid or is currently selected into a DC, the return value is
.