Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

UnrealizeObject function

The UnrealizeObject function resets the origin of a brush or resets a logical palette. If the hgdiobj parameter is a handle to a brush, UnrealizeObject directs the system to reset the origin of the brush the next time it is selected. If the hgdiobj parameter is a handle to a logical palette, UnrealizeObject directs the system to realize the palette as though it had not previously been realized. The next time the application calls the RealizePalette function for the specified palette, the system completely remaps the logical palette to the system palette.

Syntax


BOOL UnrealizeObject(
  _In_  HGDIOBJ hgdiobj
);

Parameters

hgdiobj [in]

A handle to the logical palette to be reset.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

Remarks

The UnrealizeObject function should not be used with stock objects. For example, the default palette, obtained by calling GetStockObject (DEFAULT_PALETTE), is a stock object.

A palette identified by hgdiobj can be the currently selected palette of a device context.

If hgdiobj is a brush, UnrealizeObject does nothing, and the function returns TRUE. Use SetBrushOrgEx to set the origin of a brush.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Colors Overview
Color Functions
GetStockObject
RealizePalette
SetBrushOrgEx

 

 

Community Additions

Show:
© 2014 Microsoft