Share via


CGdiObject::UnrealizeObject

Resets the origin of a brush or resets a logical palette.

BOOL UnrealizeObject( );

Return Value

Nonzero if successful; otherwise 0.

Remarks

While UnrealizeObject is a member function of the CGdiObject class, it should be invoked only on CBrush or CPalette objects.

For CBrush objects, UnrealizeObject directs the system to reset the origin of the given brush the next time it is selected into a device context. If the object is a CPalette object, UnrealizeObject directs the system to realize the palette as though it had not previously been realized. The next time the application calls the CDC::RealizePalette function for the specified palette, the system completely remaps the logical palette to the system palette.

The UnrealizeObject function should not be used with stock objects. The UnrealizeObject function must be called whenever a new brush origin is set (by means of the CDC::SetBrushOrg function). The UnrealizeObject function must not be called for the currently selected brush or currently selected palette of any display context.

Requirements

Header: afxwin.h

See Also

Reference

CGdiObject Class

Hierarchy Chart

CDC::RealizePalette

CDC::SetBrushOrg