GetStandardObject


static Handle GetStandardObject(int Object)

This function obtains a handle of a predefined object.

Parameters

int Object

BrushIdentity::Black Black Brush.
BrushIdentity::DarkGray Dark gray Brush.
BrushIdentity::Device Solid color Brush - the default color is white.
BrushIdentity::Gray Gray Brush.
BrushIdenity::Hollow Hollow Brush.
BrushIdentity::LightGray Light gray Brush.
BrushIdentity::Null Null Brush.
BrushIdentity::white white Brush.

PenIdentity::Black Black Pen.
PenIdentity::Device Solid Pen color - the default color is white.
PenIdentity::white white Pen.

StandardFont::FixedANSI The windows fixed-pitch (monospaced) system font.
StandardFont::VariableANSI The windows variable-pitch (proportional spaced) system font.
StandardFont::DeviceDefault The default device-dependent font.
StandardFont::GraphicsDefault The default font for user graphics interface objects.
StandardFont::FixedOEM Original equipment manufacturer dependent fixed-pitch (monospaced) font.
StandardFont::System The system font.
StandardFont::FixedSystem A fixed-pitch (monospaced) system font (archaic usage).

SystemPaletteValue::Default The default palette. This palette holds the static colors of the system palette.

Return

Handle

The handle of the requested, predefined object.

Notes

The color of the object BrushIdentity::Device can be changed using the function SetDeviceContextBrushColor.

The __stdcall objects BrushIdentity::DarkGray, BrushIdentity::Gray, and BrushIdentity::LightGray may be used only in windows with the styles ClassStyle::HorizontalRedraw and ClassStyle::VerticalRedraw. Using a gray stock brush in a window not possessing this style can lead to misalignment of brush patterns when the window is moved or sized. The origins of __stdcall brushes cannot be adjusted.

The color of the object PenIdentity::Device can be changed using the function SetDeviceContextPenColor.

The objects BrushIdentity::Device and PenIdentity::Device may be used interchangeably with other stock objects like BrushIdentity::Black and PenIdentity::Black. For information on retrieving the current pen or brush color, see functions GetDeviceContextBrushColor and GetDeviceContextPenColor. Calling this function with a parameter of BrushIdentity::Device or PenIdentity::Device is equivalent to calling the function GetDeviceContextBrushColor or GetDeviceContextPenColor (respectively).

The font object StandardFont::GraphicsDefault is the font used by the system to draw objects such as menus and dialog boxes. The font used by the object StandardFont::GraphicsDefault may change.

The font object StandardFont::System is used to draw dialog box controls and text.

It is not necessary to delete __stdcall objects via the function DeleteObject.

Details

Name Space IPlusPlus::Graphics
Class Gdi
Assembly IPlusPlus.WinPlus.dll